Question : Pass through query to Oracle

Hi all.  I'm writing a pass through query to oracle from access97.  My where condition is FIELD > 12/31/00.  The oracle odbc error I get is #932 - inconsistent data types.  When I link this table, the data type shows up as Date/Time.  Below is my actual query:

SELECT *
FROM WW_STR_CLAIM_HDR
WHERE STR_BUS_DATE >12/31/00

Can anyone see what I'm doing wrong???

Thanks

Answer : Pass through query to Oracle

dds110,
   The default Oracle date format is a string and it's DD-MON-YYYY.  So, you need to do one of the following:

1) Use the default format:

SELECT *
FROM WW_STR_CLAIM_HDR
WHERE STR_BUS_DATE > '31-DEC-2000';


or:

2) Convert your literal into a date using the to_date function:

SELECT *
FROM WW_STR_CLAIM_HDR
WHERE STR_BUS_DATE > to_date('12312000','MMDDYYYY');

Good luck!

Random Solutions  
 
programming4us programming4us