pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: pgsql-sql@postgresql.org
Subject: Re: query configuration for validate empty quote to zero
Date: Tue, 18 Jan 2005 17:17:49 +0100
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at> (raw)

Did you try to explicitly give the type for the literal?
e.g.  ''::varchar 
 
 -----Original Message-----
From: Yudie [mailto:yudie@axiontech.com]
Sent: Montag, 17. Jänner 2005 19:44
To: pgsql-sql@postgresql.org
Subject: [SQL] query configuration for validate empty quote to zero



We just changed the postgresql server and got some problem with sql command
in our old server we can exexute this query: 
 
SELECT * FROM product WHERE prdtnumber = ''
 
field prdtnumber data type is integer and the empty quote somehow can be
assumed into 0 (zero)
Now,  if I use the same query it return an error:
invalid input syntax for integer: ""
 
Anyone know what's the problem??
 
Thanks
 
Yudie
 
 

view thread (4+ messages)

Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at>
Permalink:  ../ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at/
Also on:    postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: robert.koepferl@sonorys.at
  Subject: Re: query configuration for validate empty quote to zero
  In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at>
  References: <ED4E30DD9C43D5118DFB00508BBBA76EB16566@neptun.sonorys.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox