Received: from cncware.whidbey.com (IDENT:root@cncware.whidbey.com [208.25.171.37]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA57403 for ; Wed, 2 Feb 2000 00:49:57 -0500 (EST) (envelope-from ken@ori-ind.com) Received: from ken (ren.cncware.com [192.168.61.201]) by cncware.whidbey.com (8.9.3/8.9.3) with SMTP id VAA13855; Tue, 1 Feb 2000 21:51:06 -0800 Message-Id: <3.0.32.20000201215115.0086ce80@ren.cncware.com> X-Sender: ken_ori@ren.cncware.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Tue, 01 Feb 2000 21:51:17 -0800 To: Byron Nikolaidis From: "Ken J. Wright" Subject: Re: [INTERFACES] problem with numeric Cc: pgsql-interfaces@postgreSQL.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 20:52 02/01/2000 -0500, Byron Nikolaidis wrote: > > >"Ken J. Wright" wrote: >> >> v6.5.3 >> >> While testing the new ODBC driver I ran into the following problem with >> queries on numeric fields. Unless the values are surrounded by single quote >> marks, the query fails with the message: Unable to identify an operator '=' >> for types 'numeric' and 'float'. This occurs in the WHERE clause of the >> query. >> >> SELECT * from tbl WHERE numfld = 99.125; >> UPDATE tbl SET numfld = 99.13 WHERE numfld = 99.125; >> >> An INSERT works fine. >> >> These statements execute ok on float fields, but not numeric. This happens >> via ODBC and also with psql from a Linux console. >> >> Ken >> >> ************ > >Ok, I can put quotes around it, as long as you use a bound parameter. >In other words, you have to use something like "select * from tbl where >numfld = ?", and then bind parameter 1 to be the numeric type. > >The driver will not try to put quotes around a numeric embedded into an >sql query. > >For completeness, I think Postgres should work with or without the >quotes, after all, it is a numeric field. If this where the case, then >flat queries (i.e., no Bounded parameters) would work too. Yeah, I think the backend kinda goes for a Burton here. Like you say, it is a numeric field! Ken