469,307 Members | 2,081 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

To Retrieve last inserted records according to their insertion timestamp

Hi,

I want to retrieve the records which are last inserted and i used order by clause and desc in inner query and when comes to the outer query it is not working. Please find the solution

DB2 SELECT (SKU_CORRLTN_ID) FROM(SELECT PRDCT_LISTING_ID,SKU_LISTING_ID,SKU_CORRLTN_ID,CHA NGE_EVENT_ID FROM TEST WHERE PRDCT_LISTING_ID=8266 AND CHANGE_EVENT_ID=856 ORDER BY SKU_LISTING_ID DESC) TEST

This is my query
Apr 8 '15 #1
0 1285

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Ricardo | last post: by
3 posts views Thread by lostboy | last post: by
2 posts views Thread by Luis P. Mendes | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.