Re: SQL error 'Unable to identify an operator = for type - Mailing list pgsql-novice

From Joel Burton
Subject Re: SQL error 'Unable to identify an operator = for type
Date
Msg-id Pine.LNX.4.30.0203081015010.10273-100000@temp.joelburton.com
Whole thread Raw
In response to SQL error 'Unable to identify an operator = for type numeric?'  ("Patrick Hatcher" <PHatcher@macys.com>)
List pgsql-novice
On Thu, 7 Mar 2002, Patrick Hatcher wrote:

> I have table defined as such:
>
> Create Table t1
> (
> f1 int,
> f2 numeric (13,2)
> )
>
> insert into t1 values (1,12.22);
> insert into t1 values (2,12);
>
> if I do the following query I receive data:
>
> Select  * from t1 where f2 = 12;

have to explicitly cast this:

select * from t1 where f2::int = 12
 or
select * from t1 where f2 = 12::numeric

should work

--

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant


pgsql-novice by date:

Previous
From: Bo Lorentsen
Date:
Subject: Grand group rights ?
Next
From: "Josh Berkus"
Date:
Subject: Re: Size of the Postgres DB