Don't even want to know why a date is stored as separate varchar2() columns but this may help you in describe scenario...
Please take into consideration "between" returns both ends of the range.Code:SQL> SQL> create table table_name( 2 month varchar2(2), 3 year varchar2(4) 4 ); Table created. SQL> insert into table_name values ('09','2009'); 1 row created. SQL> insert into table_name values ('10','2009'); 1 row created. SQL> insert into table_name values ('11','2009'); 1 row created. SQL> insert into table_name values ('12','2009'); 1 row created. SQL> insert into table_name values ('01','2010'); 1 row created. SQL> commit; Commit complete. SQL> select * 2 from table_name tn 3 where to_date(tn.month||tn.year,'mmyyyy') 4 between to_date('102009','mmyyyy') 5 and to_date('122009','mmyyyy') 6 ; MO YEAR -- ---- 10 2009 11 2009 12 2009 SQL>




Reply With Quote