aravindunlimited
New User
Joined: 08 May 2006 Posts: 16
|
|
|
|
I am building an unload card for my project. The unload card comprises of three sqls(on 3 similar tables) stacked on one top of the other, as shown below. The primary key of the table is ABC,PQR,XYZ
UNLOAD DIRECT NO
SELECT
ABC,
PQR
XYZ
FROM TABLE1
WHERE XYZ = ‘Y’
ORDER BY
PQR,
XYZ;
SELECT
ABC,
PQR
XYZ
FROM TABLE2
WHERE XYZ = ‘M’
ORDER BY
PQR,
XYZ;
SELECT
ABC,
PQR
XYZ
FROM TABLE3
WHERE XYZ = ‘E’
ORDER BY
PQR,
XYZ;
I was expecting the result to be sorted in the order of PQR, XYZ. But the result is coming in order of primary keys! While I run the unload with individual sqls, I am getting the result sorted in PQR, XYZ order, so I believe the issue is out with the multiple sqls format that I have used.
In such a circumstance how do I achieve the desired sort order? |
|