knowledge-database (beta)

Current group: pgsql.sql

Re: query configuration for validate empty quote to zero

Re: query configuration for validate empty quote to zero  
KÖPFERL_Robert
From:KÖPFERL_Robert
Subject:Re: query configuration for validate empty quote to zero
Date:Tue, 18 Jan 2005 17:17:49 +0100
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



charset=3DISO-8859-1">






Did =
you try to=20
explicitly give the type for the literal?

size=3D2>class=3D138171716-18012005>color=3D#0000ff>e.g. =20
''::varchar 

class=3D138171716-18012005> 

class=3D138171716-18012005> -----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


style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
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

 

size=3D2> 


------_=_NextPart_001_01C4FD79.40C44050--
   

Copyright © 2006 knowledge-database   -   All rights reserved