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

Поиск
Список
Период
Сортировка
От Joel Burton
Тема Re: SQL error 'Unable to identify an operator = for type
Дата
Msg-id Pine.LNX.4.30.0203081015010.10273-100000@temp.joelburton.com
обсуждение исходный текст
Ответ на SQL error 'Unable to identify an operator = for type numeric?'  ("Patrick Hatcher" <PHatcher@macys.com>)
Список 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 по дате отправления:

Предыдущее
От: Bo Lorentsen
Дата:
Сообщение: Grand group rights ?
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Size of the Postgres DB