ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DB2 query fail in Mainframe.

Post new topic  Reply to topic
 DB2 query fail in Mainframe. « View previous topic :: View next topic » 
Author Message
abs_cal
PostPosted: Tue Nov 16, 2010 11:51 am    Post subject: DB2 query fail in Mainframe. Reply with quote

Acolyte

Joined: 18 Aug 2005
Posts: 62

we have Db2 in MF, This query is failing when there is no records in table. I want to get this query done to understand this would be my first messages in the table.

SET Environment.Varibales.DUMMY = COALESCE(SELECT MAX(T.CD_RETURN) FROM Database.T_TCTRL AS T, 0);

Here is the errors.
Text:CHARACTER:[IBM][CLI Driver][DB2] SQLSTATE 01003: Null values were eliminated from the argument of a column function.

Thanks in advance..
Back to top
View user's profile Send private message
Amitha
PostPosted: Tue Nov 16, 2010 12:50 pm    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2009
Posts: 80
Location: Newyork

Quote:
Text:CHARACTER:[IBM][CLI Driver][DB2] SQLSTATE 01003: Null values were eliminated from the argument of a column function.


It is throwing an error because column is null. To overcome this error you can do this:

PASSTHRU( 'SELECT COALESCE(MAX(T.CD_RETURN),0) FROM Database.T_TCTRL T')

Please note, The code is not tested.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DB2 query fail in Mainframe.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.