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 can´t believe that there is no other way.
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');
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