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 » To select first N number of records??

Post new topic  Reply to topic
 To select first N number of records?? « View previous topic :: View next topic » 
Author Message
anoobrocks
PostPosted: Sun Oct 03, 2010 2:46 am    Post subject: To select first N number of records?? Reply with quote

Newbie

Joined: 28 Sep 2010
Posts: 8

Hi,

I am using MB6.0 and wanted to select first N number of records from the table based on the value in the UDP (GroupCount).

SET Environment.Variables.output[] = SELECT R.* FROM Database.GROUP AS R WHERE rownum <= GroupCount;

But i'm getting an error -
BIP2432E: The correlation name 'rownum' is not valid.

Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Oct 03, 2010 3:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ESQL select doesn't know about any database specific functions for managing rows.

So if 'rownum' is not a column in your table, then you need to use PASSTHROUGH.

ESQL select is NOT the same thing as SQL Select. Every field in an ESQL select *MUST* start with the correlation ID you create with the AS clause. So if rownum *is* a column in your table, you must *always* identify it as "R.rownum" in an ESQL select if you have said "AS R".
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Oct 03, 2010 3:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And message broker 6 goes out of support in less than a year. You should not be learning on it nor using it to develop new message flow applications.
Back to top
View user's profile Send private message
anoobrocks
PostPosted: Sun Oct 03, 2010 3:56 am    Post subject: Reply with quote

Newbie

Joined: 28 Sep 2010
Posts: 8

Thank jeff,

And in my case Rownum is not a column here.. since i need first N records from the table, i tried giving ROWNUM.. guess it doesnt support in ESQL..

As i mentioned before, all i need is to select the no of records from table based on the UDP value. I cant use any column name here as the values in it are same sometime/repeating values..
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 » To select first N number of records??
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.