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 » SQLServer is unable to read the % in PASSTHRU statement

Post new topic  Reply to topic
 SQLServer is unable to read the % in PASSTHRU statement « View previous topic :: View next topic » 
Author Message
AKSHAYA
PostPosted: Wed Feb 25, 2009 5:45 am    Post subject: SQLServer is unable to read the % in PASSTHRU statement Reply with quote

Newbie

Joined: 24 Dec 2008
Posts: 9

I am working on Message Broker 6.1,MQ 6.0,SQL Server

1)I have multiple application name ex:[Test],[Test1],[Test2],[Test3]
2)In the SQL SERVER DSN1 is the DSN Name and TESTDB is the Table Name.
2)I am trying to populate the Shared Variables as:

SET searchString= appName ||'%';/***parametrized passing of the application name)***/
SET SharedVariable.app[] = PASSTHRU('SELECT a.X1Y1Z1, a.X2Y2Z2,a.X3Y3Z3 FROM {Schema}.TESTDB AS a WHERE
a.X1Y1Z1 LIKE ?' TO Database.DSN1 VALUES(searchString));

The query is working fine with the DB2 database but with the SQL server its not able to read the '%' property.
As i want the SQL query to display results for all ex:[Test],[Test1],[Test2],[Test3] actually it only passes value for the
application name [Test] and ignores the rest.Is there any equivalence of '%' in ESQL(MB 6.1)

Kindly help with the suggestions.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Feb 25, 2009 7:18 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

its pretty much DB related, % is understandable by DB2 but not by SQL Server

Search it out in google and find out its replacement in SQL Server
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
AKSHAYA
PostPosted: Mon Mar 02, 2009 11:45 pm    Post subject: Error Regarding Sql server in message broker Reply with quote

Newbie

Joined: 24 Dec 2008
Posts: 9

Yes, its correct but % is also understandable by SQL server as well as ESQL code.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Mar 02, 2009 11:49 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

it will be great, if you can try out that SQL query directly on SQL Server console and see the output

if it is working well, your query is well and good,

else try to make it work and use that query in the PASSTHRU
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
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 » SQLServer is unable to read the % in PASSTHRU statement
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.