Dec 14, 2000 #1 campbere Technical User Oct 10, 2000 146 US I am trying to run the following query in Oracle but I am getting no rows, when I know they exist. select * from table where ddate > '31-DEC-98' ddate is listed as a date column. Can anyone help?
I am trying to run the following query in Oracle but I am getting no rows, when I know they exist. select * from table where ddate > '31-DEC-98' ddate is listed as a date column. Can anyone help?
Dec 14, 2000 1 #2 ATP Programmer Nov 1, 2000 40 GB This should work as Oracle usually converts the string to a date date format. If it's the wrong format then it should complain. To make sure it's converting to a date try: select * from table where ddate > to_date('31/12/1998','DD/MM/YYYY') Upvote 0 Downvote
This should work as Oracle usually converts the string to a date date format. If it's the wrong format then it should complain. To make sure it's converting to a date try: select * from table where ddate > to_date('31/12/1998','DD/MM/YYYY')
Dec 14, 2000 1 #3 MikeJones Programmer Nov 1, 2000 259 GB try... select * from table where ddate > to_date('31-DEC-98','DD-MON-RR') or... select * from table where ddate > '31-DEC-1998' HTH, Mike. Upvote 0 Downvote
try... select * from table where ddate > to_date('31-DEC-98','DD-MON-RR') or... select * from table where ddate > '31-DEC-1998' HTH, Mike.
Dec 14, 2000 Thread starter #4 campbere Technical User Oct 10, 2000 146 US Thanks the to_date function was the trick. Upvote 0 Downvote