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 » database query question

Post new topic  Reply to topic
 database query question « View previous topic :: View next topic » 
Author Message
vlburch
PostPosted: Thu Dec 07, 2006 3:01 pm    Post subject: database query question Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 4
Location: Kansas City MO

I am trying to query an Oracle table with the controlling column defined as varchar2 so I need to have my where variable in quotes. This code
is not working:

SET unit.info[] = select x.ag_id
,x.unid
from Database.def_unit as x
where x.unid = 'hcrew';

But performing the query in sqlplus works. So does it lose the quotes around the variable hcrew in passing and send something like 9011B instead of '9011B' or does it send 'hcrew' as the test value?

Is there anyway to load a variable to the value '

I'm using 6.0 version of the Broker and it appears that setting a variable to this ''' does not work. (SET quot = '''

I was going to try building the SQL in a variable and use PASSTHRU, and that is when I discovered the ''' did not work.
_________________
VLBurch
Back to top
View user's profile Send private message
cadenza
PostPosted: Thu Dec 07, 2006 5:23 pm    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 48

Hi,

If hcrew is a variable then you need not put single quotes around it. Broker automatically puts single quotes around it. You need to use single quotes only when you are hard-coding the value.

What happens if you do send the query by not providing the single quotes around your variable?
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 » database query question
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.