Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Amarnath.
Asked: September 27, 2016 - 4:39 am UTC
Last updated: September 28, 2016 - 7:23 am UTC
Version: ORACLE 10 G
Viewed 1000+ times
SQL> create table t 2 as select add_months(date '2015-01-01',rownum) d 3 from dual 4 connect by level <= 24; Table created. SQL> SQL> select * from t order by 1; D --------- 01-FEB-15 01-MAR-15 01-APR-15 01-MAY-15 01-JUN-15 01-JUL-15 01-AUG-15 01-SEP-15 01-OCT-15 01-NOV-15 01-DEC-15 01-JAN-16 01-FEB-16 01-MAR-16 01-APR-16 01-MAY-16 01-JUN-16 01-JUL-16 01-AUG-16 01-SEP-16 01-OCT-16 01-NOV-16 01-DEC-16 01-JAN-17 24 rows selected. SQL> SQL> SQL> select 2 d, 3 case when d between date '2015-06-01' and date '2016-12-01' then d end subset_of_dates 4 from t 5 order by 1; D SUBSET_OF --------- --------- 01-FEB-15 01-MAR-15 01-APR-15 01-MAY-15 01-JUN-15 01-JUN-15 01-JUL-15 01-JUL-15 01-AUG-15 01-AUG-15 01-SEP-15 01-SEP-15 01-OCT-15 01-OCT-15 01-NOV-15 01-NOV-15 01-DEC-15 01-DEC-15 01-JAN-16 01-JAN-16 01-FEB-16 01-FEB-16 01-MAR-16 01-MAR-16 01-APR-16 01-APR-16 01-MAY-16 01-MAY-16 01-JUN-16 01-JUN-16 01-JUL-16 01-JUL-16 01-AUG-16 01-AUG-16 01-SEP-16 01-SEP-16 01-OCT-16 01-OCT-16 01-NOV-16 01-NOV-16 01-DEC-16 01-DEC-16 01-JAN-17 24 rows selected.
Amarnath Sharma, September 27, 2016 - 6:46 am UTC
Ravi B, September 28, 2016 - 5:04 am UTC
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!