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 Question regarding Passthru

Post new topic  Reply to topic
 Database Question regarding Passthru « View previous topic :: View next topic » 
Author Message
Kraven12
PostPosted: Fri Nov 15, 2002 10:24 am    Post subject: Database Question regarding Passthru Reply with quote

Novice

Joined: 21 Oct 2001
Posts: 21

I am trying to retrieve a value from a UDB database using an inner join in the query. Because of the join, I am using Passthru.

Here is the code:

SET rgn_id = (PASSTHRU('SELECT R.RGN#ID
FROM F5977DB.TSCORG O INNER JOIN F977DB.TSCRGNDEF R ON O.PLCY#NBR = R.PLCY#NBR
WHERE O.ORG#NBR = ?
AND R.STTE#CDE = ?
AND ? BETWEEN R.RGNDEF#MIN_ZIP_NBR
AND R.RGNDEF#MAX_ZIP_NBR', InputRoot.MRM.ELIG_REC.ELIG_ORG_NBR, InputRoot.MRM.ELIG_REC.ELIG_STTE_CDE, InputRoot.MRM.ELIG_REC.ELIG_RES_ZIP_NBR));

When this is run I receive the following error:
"Trying to assign or use a list as a scalar"

I know this query returns only 1 result. I have tried using the "THE" keyword but it gets a syntax error.

Any ideas would be greatly appreciated.

Thanks in advance.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Nov 15, 2002 1:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

You will have to use
SET Environment.Variables.rgn_id[] = ......

WMQI will not know whether the PASSTHRU statement will return only one record!
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database Question regarding Passthru
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.