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 » single quotes in ESQL assignment: what's wrong in this stmt?

Post new topic  Reply to topic
 single quotes in ESQL assignment: what's wrong in this stmt? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Thu Jul 23, 2009 4:56 am    Post subject: single quotes in ESQL assignment: what's wrong in this stmt? Reply with quote

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
View user's profile Send private message
jbanoop
PostPosted: Thu Jul 23, 2009 5:10 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
pcelari
PostPosted: Thu Jul 23, 2009 5:21 am    Post subject: Reply with quote

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
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 » single quotes in ESQL assignment: what's wrong in this stmt?
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.