From: Atli T. <at...@ga...> - 2004-05-28 14:43:24
|
It seems to have something to do with having '3 hours' enclosed in quotes. If I remove the quotes then pydb2 works fine. Does that clarify? Atli -----Original Message----- From: yu...@ad... [mailto:yu...@ad...] Sent: 28. ma=ED 2004 10:48 To: at...@ga... Cc: pyd...@li... Subject: Re: [PyDB2-discuss] inconsistency Quoting Atli Thorbjornsson <at...@ga...>: > Hi, > I am dealing with an inconsistency between replies from db2. The following > comparison works fine using db2 command line > > select ... from ... where a.time >=3D CURRENT TIMESTAMP - '3 hours' > > but when using pydb2 I get: > > SQLSTATE : 42818, NATIVE ERROR CODE : -401 > [IBM][CLI Driver][DB2/6000] SQL0401N The data types of the operands fo= r the > operation ">=3D" are not compatible. SQLSTATE=3D42818 > > Any ideas? > Atli Thorbjornsson. I'm assuming that a.time is defined to be of type timestamp, right ? ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |