Skip site navigation (1) Skip section navigation (2)

Re: SQL error 'Unable to identify an operator = for type

From: Joel Burton <joel(at)joelburton(dot)com>
To: Patrick Hatcher <PHatcher(at)macys(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SQL error 'Unable to identify an operator = for type
Date: 2002-03-08 15:15:38
Message-ID: Pine.LNX.4.30.0203081015010.10273-100000@temp.joelburton.com (view raw or flat)
Thread:
Lists: 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(at)joelburton(dot)com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant


In response to

pgsql-novice by date

Next:From: Josh BerkusDate: 2002-03-08 16:26:05
Subject: Re: Size of the Postgres DB
Previous:From: Bo LorentsenDate: 2002-03-08 12:23:49
Subject: Grand group rights ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group