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 » Using Database Name and Schema in PASSTHRU query not working

Post new topic  Reply to topic
 Using Database Name and Schema in PASSTHRU query not working « View previous topic :: View next topic » 
Author Message
wmb_wps_soa
PostPosted: Fri Feb 04, 2011 9:04 am    Post subject: Using Database Name and Schema in PASSTHRU query not working Reply with quote

Acolyte

Joined: 19 Feb 2010
Posts: 65
Location: Detroit,Michigan,USA.

Guys,

I am encountering a problem with WMB7. The problem is , PASSTHRU with Database name and Schema name is not working and getting an error "[IBM][CLI Driver][DB2/NT] SQL0108N The name "TEST_TABLE" has the wrong number of qualifiers. SQLSTATE=42601 "

The constructed query is as below:

DELETE FROM Database.SAMPLE.XPMUSER.TEST_TABLE WHERE STAFFNUM=123456 AND FIRSTNAME='COOL'

And here is how the PASSTHRU is being constructed:

SET conditionList = KeyName || '=' ||''''|| keyValue ||''''||'';

SET dynamicDeleteQuery = 'DELETE FROM Database.' || databaseName || '.' || dbSchema || '.' || dbTable || ' WHERE ' || conditionList;
PASSTHRU(dynamicDeleteQuery);

Can anyone please help?

Thanks,
Jeba
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 04, 2011 9:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

PASSTHRU uses standard SQL syntax, not ESQL syntax.

That's why it's called "passthru" because the statement "passes through" the ESQL environment into the SQL environment.
Back to top
View user's profile Send private message
wmb_wps_soa
PostPosted: Fri Feb 04, 2011 10:51 am    Post subject: Reply with quote

Acolyte

Joined: 19 Feb 2010
Posts: 65
Location: Detroit,Michigan,USA.

It worked fine after I removed the word "Database" from the PASSTHRU statement.

The working PASSTHRU is as below:

SET dynamicDeleteQuery = 'DELETE FROM ' || databaseName || '.' || dbSchema || '.' || dbTable || ' WHERE ' || conditionList;
PASSTHRU(dynamicDeleteQuery);

Thank you Guys

Surendra
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using Database Name and Schema in PASSTHRU query not working
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.