Re: CAST - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: CAST
Date
Msg-id Pine.LNX.4.21.0009281120050.363-100000@peter
Whole thread Raw
In response to CAST  ("Enrico Comini" <algobit@algobit.com>)
List pgsql-general
Enrico Comini writes:

> Hi, how I have to change the next query ?
>
> da_kg=Numeric
> a_kg =Numeric
>
> cusiodb=# SELECT * FROM tavola_pesi WHERE ((da_kg < 3.5) and (a_kg >= 3.5));
> ERROR:  Unable to identify an operator '<' for types 'numeric' and 'float8'
>         You will have to retype this query using an explicit cast

CAST(3.5 as numeric)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: "Enrico Comini"
Date:
Subject: CAST
Next
From: "Martin A. Marques"
Date:
Subject: Re: full text indexing