Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle ODBC with Access

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
0
0
CA
Hi,

Currently using MS Access Query to retreive data from Oracle database thrugh ODBC.

The query is retrieves all data for a date range given.

Requirement is to retrieve only those data with a date range given.

Please help

Cap
 
Look into the 'between' SQL key word. I think that you are looking for something like,
Code:
SELECT * FROM Table1 WHERE TheDate BETWEEN Date1 AND Date2
Syntax needs to be verified.

Also, this is more of an SQL question. You probably won't get many responses in this forum. You might want to make sure that you post in the SQL forum of the tool you are using. (Access/Jet SQL).

zemp
 
Yes this is right, only things is on giving dates for date1 and date2 it displays all records.

date1 = 11/1/2004
date2 = 11/10/2004

Captain
 
Try surrounding the dates with the '#'. That's Access SQL syntax.
Code:
SELECT * FROM Table1 WHERE TheDate BETWEEN #Date1# AND #Date2#
How are you building your SQL? Is the concatenation correct? Try posting the relevant code.

zemp
 
I am trying to do it using Query mode given in MS Access and not through module.

Cap2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top