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 » Nested query in esql message broker

Post new topic  Reply to topic
 Nested query in esql message broker « View previous topic :: View next topic » 
Author Message
team
PostPosted: Fri Feb 21, 2014 2:12 am    Post subject: Nested query in esql message broker Reply with quote

Centurion

Joined: 03 Nov 2006
Posts: 108

Hi Team,

We are using below query to retrieve all Employees (Character) and Amount (Decimal) that contain recent access date (Date).

Note: Both are the same table specified in where clause.

DECLARE selectSql CHARACTER 'SELECT Emp AS Employee,
Amt AS Amount
FROM DB_PREFIX.Table
WHERE Date = (SELECT MAX(B.Date)
FROM DB_PREFIX.table B
WHERE Employee = B.Employee)
WITH UR';

DELETE Field Environment.temp.*[<];
SET Environment.fromTable[]= PASSTHRU (selectSql);

Is the above syntax correct?
Back to top
View user's profile Send private message Yahoo Messenger
Gralgrathor
PostPosted: Fri Feb 21, 2014 2:40 am    Post subject: Re: Nested query in esql message broker Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

team wrote:
Is the above syntax correct?


I don't think so (your db server will be complaining about an ambiguous reference to Employee, for one thing). But since you're formatting an SQL query and using PASSTHRU, this has little to do with ESQL or WMB, and more with the underlying database server you're using.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Nested query in esql message broker
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.