SQL error 'Unable to identify an operator = for type numeric?'

Поиск
Список
Период
Сортировка
От Patrick Hatcher
Тема SQL error 'Unable to identify an operator = for type numeric?'
Дата
Msg-id OF64FBA054.BCFAF8CC-ON88256B75.006AD67C@fds.com
обсуждение исходный текст
Ответы Re: SQL error 'Unable to identify an operator = for type  (Joel Burton <joel@joelburton.com>)
Список pgsql-novice
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;

If I do the following I get
Unablel to identify an operator '=' for types 'numeric' and 'double
precision'  You will have to retype this query using an
explicit cast:

Select  * from t1 where f2 = 12.22;

If I put single quotes around '12.22' it works.  I must be using the wrong
data type

What data type do I need to set instead of MONEY?  Should I use FLOAT8?

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-932-0610 office




В списке pgsql-novice по дате отправления:

Предыдущее
От: Jon Hassen
Дата:
Сообщение: Re: index item size 4496 exceeds maximum 2713
Следующее
От: Brian
Дата:
Сообщение: starting the postmaster