Thursday, February 28, 2013

Query to return NULL values LAST


select distinct ibh.HEADER_NAME,MAX(ibd.LAST_UPDATE_DATE)
from HEADER_TABLE ibh,DETAILS_TABLE ibd
where ibh.USER_ID =#user_id
and ibh.HEADER_ID = ibd.HEADER_ID (+)
group by ibh.HEADER_NAME
order by MAX(ibd.LAST_UPDATE_DATE)
desc NULLS LAST

No comments:

Post a Comment

Provide your thoughts !