From: | David Merrill <david(at)lupercalia(dot)net> |
---|---|
To: | postgreSQL <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Recasting data type |
Date: | 2001-02-07 20:07:02 |
Message-ID: | 20010207150702.B6493@lupercalia.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Wed, Feb 07, 2001 at 11:31:43AM -0800, Conrad Schuler wrote:
> Hi All,
>
> Thanks for the help on the 'lumper' vs. 'splitter' question.
>
> I asked my practice database:
>
> select count (*) from titles where price > 20
>
> It responded:
>
> PostgreSQL said: ERROR: Unable to identify an operator '>' for types
> 'money' and 'int4' You will have to retype this query using an explicit cast
>
> I tried variations on this theme and got nowhere:
> select count (*) from titles cast(price as float8) where price > 20
Why don't you try:
select count(*) from titles where price > 20.00
It seems that the explicit decimal should automatically cause the
cast. I'm not positive it will work, but it's worth a try.
--
Dr. David C. Merrill http://www.lupercalia.net
Linux Documentation Project david(at)lupercalia(dot)net
Collection Editor & Coordinator http://www.linuxdoc.org
Finger me for my public key
One seldom sees a monument to a committee.
From | Date | Subject | |
---|---|---|---|
Next Message | Etienne De Kerckhove | 2001-02-07 21:23:59 | UPDATES |
Previous Message | Francisco Reyes | 2001-02-07 19:44:59 | Re: Re: RE: Sizing of LARGE databases. |