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 » Using INTERSECT(SQL operator) in ESQL

Post new topic  Reply to topic
 Using INTERSECT(SQL operator) in ESQL « View previous topic :: View next topic » 
Author Message
Lucky
PostPosted: Mon Sep 17, 2012 10:30 pm    Post subject: Using INTERSECT(SQL operator) in ESQL Reply with quote

Apprentice

Joined: 06 Feb 2007
Posts: 35

Hi All,

I am using Message broker V6.0. I've a scenario where in I've to get the result set Id from a table using Intersect sql operatot.

Query I am executing is :
DECLARE Id CHAR ;
DECLARE caseNum CHAR 3301010673;
DECLARE busPermId CHAR 3301010673;

SET Id = SELECT alt.interaction_id FROM Database.interaction_logging.interaction_alternate_id as alt WHERE alt.alternate_id = caseNum
INTERSECT
(select p.interaction_id from Database.interaction_logging.interaction_alternate_id as p WHERE p.alternate_id = busPermId)

First of all I am not able to compile the code and get below error in Toolkit.
Syntax error. Valid options include: identifier BEGIN CALL CASE CREATE DECLARE DELETE ELSE ELSEIF END
EVAL FOR IDENTIFIER IF INSERT ITERATE LEAVE LOOP PASSTHRU REPEAT
RETURN UNTIL VALUES WHEN WHILE


So, is there a way of implementing SQL INTERSECT operator in ESQL or please help me solve the above error.

Thanks.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Sep 18, 2012 5:13 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

You might try passthru but in any event, V6.0 is end of life for a year and a half (18 months) already. Upgrade to V8.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Sep 18, 2012 6:52 am    Post subject: Re: Using INTERSECT(SQL operator) in ESQL Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Lucky wrote:
So, is there a way of implementing SQL INTERSECT operator in ESQL


ESQL Select doesn't support an INTERSECT operation, regardless of what version.

You should upgrade to a supported level - but it won't "solve" your "problem".

You could use PASSTHRU to use your database engine's SELECT statement, which might support INTERSECT.

Otherwise, you need to write your own code to perform an intersect of two lists.
Back to top
View user's profile Send private message
NealM
PostPosted: Tue Sep 18, 2012 7:45 am    Post subject: Reply with quote

Master

Joined: 22 Feb 2011
Posts: 230
Location: NC or Utah (depends)

When you look up PASSTHRU in your v6 ESQL manual, be sure to read about both the PASSTHRU statement and the PASSTHRU function. And the function has the better example to follow.
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 » Using INTERSECT(SQL operator) in ESQL
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.