Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Wednesday, August 24, 2016

Show 7 Days SQL using Connect by level


select to_char((trunc(sysdate, 'DAY') + (level - 1)), 'Day') dy
from   dual
connect by level <= ((sysdate + 7) - sysdate)

or

select to_char((trunc(sysdate, 'DAY') + (level - 1)), 'Day') dy
from   dual
connect by level <= 7

No comments:

Post a Comment