X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 691C73A1AAB for ; Tue, 18 Jan 2005 16:18:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32708-06 for ; Tue, 18 Jan 2005 16:17:51 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 47B9A3A1A21 for ; Tue, 18 Jan 2005 16:17:50 +0000 (GMT) Received: (qmail-ldap/ctrl 21532 invoked from network); 18 Jan 2005 16:17:47 -0000 Received: from unknown (HELO jupiter.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 18 Jan 2005 16:17:47 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by jupiter.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j0IGI0s03503 for ; Tue, 18 Jan 2005 17:18:00 +0100 (MET) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Tue, 18 Jan 2005 17:17:49 +0100 Message-ID: From: =?ISO-8859-1?Q?K=D6PFERL_Robert?= To: pgsql-sql@postgresql.org Subject: Re: query configuration for validate empty quote to zero Date: Tue, 18 Jan 2005 17:17:49 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4FD79.40C44050" X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/131 X-Sequence-Number: 19919 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C4FD79.40C44050 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Did you try to explicitly give the type for the literal? e.g. ''::varchar=20 =20 -----Original Message----- From: Yudie [mailto:yudie@axiontech.com] Sent: Montag, 17. J=E4nner 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:=20 =20 SELECT * FROM product WHERE prdtnumber =3D '' =20 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: "" =20 Anyone know what's the problem?? =20 Thanks =20 Yudie =20 =20 ------_=_NextPart_001_01C4FD79.40C44050 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable
Did = you try to=20 explicitly give the type for the literal?
e.g. =20 ''::varchar 
 
 -----Original = Message-----
From:=20 Yudie [mailto:yudie@axiontech.com]
Sent: Montag, 17. J=E4nner = 2005=20 19:44
To: pgsql-sql@postgresql.org
Subject: [SQL] = query=20 configuration for validate empty quote to = zero

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