|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
single quotes in ESQL assignment: what's wrong in this stmt? |
« View previous topic :: View next topic » |
Author |
Message
|
pcelari |
Posted: Thu Jul 23, 2009 4:56 am Post subject: single quotes in ESQL assignment: what's wrong in this stmt? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I need to construct a message that contains a rpc statement, sth like this
EXEC '049 00000 3783445'
where 049 is the countryCode, and 3783445 is the custID, both are contained in the InputBody.
set rpcStmt = 'EXEC' || ''' || 'GET_CUST_DETAILS ' || InputBody.CountryCode || ' 000000000 ' || InputBody.CustID || ''';
Yet, I always get the error stating "Syntax error. Valid options include : || / = >= ..."
I couldn't figure out what's wrong with the statement. It's probably about the '''. But I escaped single quote with two single quote marks as stated in the ESQL reference.
Can any expert please shed some light on what I have missed?
many thanks,
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jbanoop |
Posted: Thu Jul 23, 2009 5:10 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
Code: |
set rpcStmt = 'EXEC' || '''' || 'GET_CUST_DETAILS ' || InputBody.CountryCode || ' 000000000 ' || InputBody.CustID || ''''; |
single quote is escaped by another single quote. However this '' is also a string and needs to be enclosed in ' ' which makes it ''''. |
|
Back to top |
|
 |
pcelari |
Posted: Thu Jul 23, 2009 5:21 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
[quote="single quote is escaped by another single quote. However this '' is also a string and needs to be enclosed in ' ' which makes it ''''.[/quote]
Wooow, this unmatchingly concise statement should be added to the document at page k04870_
Many, many thanks,
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|