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

Recasting data type

From: Conrad Schuler <conrad(dot)schuler(at)masks(dot)org>
To: postgreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Recasting data type
Date: 2001-02-07 19:32:05
Message-ID: l03130300b6a74ff52d35@[192.168.0.3] (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-novice
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


Thanks,

Conrad

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Stay informed about the latest changes at masks.org,
sign up for the eNewsletter at:
<http://www.masks.org/about/form_mail/newsletter_subscribe.html>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

masks.org survives on your donations.
Please help by mailing a tax-deductible donation to:

masks.org
P.O. Box 12089
Olympia WA 98508
USA

Our website is at:
<http://www.masks.org/>




Responses

pgsql-novice by date

Next:From: Francisco ReyesDate: 2001-02-07 19:44:59
Subject: Re: Re: RE: Sizing of LARGE databases.
Previous:From: Einar KarttunenDate: 2001-02-07 13:03:13
Subject: Re: RE: Sizing of LARGE databases.

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