Page 1 of 1

Order by Clause in DB2 Enterprise stage

Posted: Thu Feb 14, 2008 2:54 pm
by rony_daniel
Hi All,

I am reading a db2 table in Datastage with DB2 Enterprise stage and using the Read Method = Table. I want to give a order by clause to the columns selected using the select list property. Where do I specify this? I tried to give it in the where clause property though I don't have a where clause, as follows:-

1 = 1 order by cust_id

This is not woking. Is there a work around for this problem other than changing the Read Method?

Re: Order by Clause in DB2 Enterprise stage

Posted: Thu Feb 14, 2008 3:00 pm
by sud
No there isn't, you have to override the SQL.

Posted: Thu Feb 14, 2008 3:54 pm
by ray.wurlod
Read Method = Table is a direct read - it does not provide for ORDER BY. Nor GROUP BY nor HAVING for that matter. This is why/how it is fast.

If you want DB2 to sort the data you must use one of the SQL-based read methods.

Posted: Tue Feb 19, 2008 4:24 pm
by rony_daniel
Thanks Ray and sud.