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 » adding a single quote to a string

Post new topic  Reply to topic
 adding a single quote to a string « View previous topic :: View next topic » 
Author Message
mehedi
PostPosted: Sat Jul 19, 2008 4:49 pm    Post subject: adding a single quote to a string Reply with quote

Centurion

Joined: 11 Nov 2001
Posts: 102
Location: PSTech

The string should contain

'ABC'

including the opening and closing quotes.

Tried
(a) SET var1 = '\'ABC'\':
(a) SET var1 = '\"ABC"\':

and many such things . Anybody with a answer ?

Thanks

Mehedi
Back to top
View user's profile Send private message MSN Messenger
mehedi
PostPosted: Sat Jul 19, 2008 6:02 pm    Post subject: How do you pass multiple values to a SELECT IN predicate Reply with quote

Centurion

Joined: 11 Nov 2001
Posts: 102
Location: PSTech

Figured out the single quote bit , and came to the realization this was not the problem .

Here is the next stumbling block --

How do you pass multiple values to a SELECT IN predicate


Declare XFirstname Char;


SET XFirstName = 'James'; \\ This returns a result (a)
SET XFirstName = 'James' || ',' || 'Jane' ; \\ no result (b)

-- The select statement below returns a value with the
-- variable as set on (a) , not with (b)
SET Environment.Variables.Data[] = (
Select FIRST_NAME
FROM EMPLOYEE
WHERE FIRST NAME IN ?' ,
XFirstName)

thanks

Mehedi
Back to top
View user's profile Send private message MSN Messenger
smdavies99
PostPosted: Sat Jul 19, 2008 10:46 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

As I see it, our second select is looking for a row (or rows) in EMPLOYEE where the name you are looking up is
'JAMES,JANE'

In the case where this occurs, you should perhaps modify the select to use

AND
OR
etc as appropriate

An IF, ELSE, END IF wrapped around it all should make it work together nicely.

Variable SQL can be a real PITA at times.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » adding a single quote to a string
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.