Select null as xyz from sysibm.sysdummy1--not work????
Up to DB2Select null as xyz from sysibm.sysdummy1--not work????
Posted by Pawan at May 08. 2008Select null as xyz from sysibm.sysdummy1
why above query does not work in db2
while
select null from dual work in oracle.....
is there any alternative of this issue????
Thanks & Regards
Pawan
Re: Select null as xyz from sysibm.sysdummy1--not work????
Posted by Gnana Sekaran Nallathambi at June 06. 2008The above query returns SQLCODE = -206, saying NULL IS NOT VALID IN THE CONTEXT WHERE IT IS USED.
Could you please let us know your exact requirement?
Re: Select null as xyz from sysibm.sysdummy1--not work????
Posted by perallis at July 03. 2009On DB2 you have to use nullif(0,0) to select numeric data oy nullif('0','0'), see the example below:
db2 "select nullif(0,0) from sysibm.sysdummy1"
Powered by
Ploneboard