0 pts.
 Queying oracle database with MS Access
I am new to Oracle. I am trying to create a query in MS Access on linked oracle tables that use a date range like this: Between FormatDateTime(Now()) And FormatDateTime(DateAdd("yyyy",-2,Now())) This works as long as I dont connect any other tables and add other parameters in other attached fields. It took me quite some time to figure out the function above as I understood that oracle handles dates differently. I need to be able to query oracle tables from MS Access and use dynamic date ranges (as above) and then add parameters to other feilds in linked tables. What have I missed. Thanks in advance. Mike

Software/Hardware used:
ASKED: May 17, 2006  12:23 AM
UPDATED: May 17, 2006  10:54 AM

Answer Wiki:
Oracle is expecting the date to come in as a date. With the formatdatetime, it is probably being presented to Oracle as a string. You should be able to set the criteria as: Between Now() and DateAdd("y",-2,now())
Last Wiki Answer Submitted:  May 17, 2006  10:54 am  by  Randym   1,740 pts.
All Answer Wiki Contributors:  Randym   1,740 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _