Re: Comparison Operator problem

From: John Burski <John(dot)Burski(at)911ep(dot)com>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Comparison Operator problem
Date: 2001-01-11 15:08:52
Message-ID: 3A5DCC84.96967857@911ep.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Just the ticket!

Thanks!

"Robert B. Easter" wrote:

> On Tuesday 09 January 2001 16:15, John Burski wrote:
> > Table "products_tbl"
> > Attribute | Type | Modifier
> > -----------+--------------+----------
> > prod_id | varchar(10) | not null
> > prod_desc | varchar(40) | not null
> > cost | numeric(6,2) | not null
> > Index: products_tbl_pkey
> >
> > john=# select * from products_tbl
> > john-# where cost > .99;
> > ERROR: Unable to identify an operator '>' for types 'numeric' and
> > 'float8'
> > You will have to retype this query using an explicit cast
> > </snip>
>
> Maybe a cast:
>
> cost > .99::numeric(6,2);
>
> --
> -------- Robert B. Easter reaster(at)comptechnews(dot)com ---------
> -- CompTechNews Message Board http://www.comptechnews.com/ --
> -- CompTechServ Tech Services http://www.comptechserv.com/ --
> ---------- http://www.comptechnews.com/~reaster/ ------------

--
John Burski
Chief IT Cook and Bottlewasher
911 Emergency Products, St. Cloud, MN
(320) 656 0076 www.911ep.com

++++++++++++++++++++++++++++++++++
+ How's your cheese holding out? +
++++++++++++++++++++++++++++++++++

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mike Hammonds 2001-01-11 16:25:59 Money Data type
Previous Message rob 2001-01-11 12:20:26 Re: converting .xls to delimited file