How to avoid use of to_date and to_char ?
Hi All,
I have table 'sample ' with columns id (number ) and dte (timestamp ) .
CREATE TABLE SAMPLE ( ID NUMBER,DTE TIMESTAMP);
Sample Records like
INSERT INTO SAMPLE VALUES( 1,SYSDATE);
INSERT INTO SAMPLE VALUES( 2,SYSDATE);
INSERT INTO SAMPLE VALUES( 3,SYSDATE+1);
INSERT INTO SAMPLE VALUES( 4,SYSDATE+1);
INSERT INTO SAMPLE VALUES( 5,SYSDATE+3);
After inserting the records the dte will have both date and time.....
My Question is, How to fetch the records for the given date ( not time ) without using to_date,to_char or trunc functions from the table .
For Example,
select * from sample where dte = '22-OCT-2008' ;
Note : '22-OCT-2008' is not exactly a string ,use it as date datatype.
Regards,
Hariharan ST