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 IndexWebSphere Message Broker SupportSort order in ESQL DB-Access

Post new topicReply to topic
Sort order in ESQL DB-Access View previous topic :: View next topic
Author Message
Armin
PostPosted: Mon Oct 15, 2001 9:54 am Post subject: Reply with quote

Novice

Joined: 24 Jul 2001
Posts: 15
Location: Germany

in a Compute Node I have to access a database table twice, the sort order ist different for each access. In ESQL I cannot use "ORDER BY" or "GROUP BY". Do I have to implement my own sort? I cant believe that there is no other way.

Armin
Back to top
View user's profile Send private message
NickB
PostPosted: Tue Oct 16, 2001 12:28 am Post subject: Reply with quote

Centurion

Joined: 20 May 2001
Posts: 107
Location: Zurich Financial Services

Armin

I guess you could form up your SQL including the ORDER BY clause and then use the PASSTHRU statement.
Back to top
View user's profile Send private message
Outdesign
PostPosted: Tue Oct 16, 2001 3:06 am Post subject: Reply with quote

Apprentice

Joined: 16 Sep 2001
Posts: 38
Location: Hampshire, UK

To further explain ...

MQSI ESQL supports a subset of existing SQL functionality.

PROS:
The code is DBMS independant, ie the same code will run against any user database.

CONS:
The supported subset is limited, ie the SELECT statement does not support the ORDER BY clause.

In order to bypass the MQSI ESQL parser, you can use the PASSTHRU function or statement.
Any SQL code written within the PASSTHRU function will not be parsed by the MQSI ESQL
parser and will be passed directly the DBMS. This allows you to write DBMS specific code
and to use some of the functionality not supported by the MQSI ESQL.

For example :

-- option 1
SET OutputRoot.XML.Test.SQLResult_1[] =
(SELECT C.name FROM Database.CUSTOMER AS C);

-- option 2
SET OutputRoot.XML.Test.SQLResult_2[] =
PASSTHRU('SELECT C.name FROM CUSTOMER AS C ORDER BY C.name');
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportSort order in ESQL DB-Access
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.