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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Format for Import to Access

Status
Not open for further replies.

phoenixnkdguy

Technical User
Jul 20, 2005
2
US
I am attempting to pull data from large (20 million + records) Teradata tables into access. The tables contain records for an entire month, and I want to be able to pull only the records for the previous day. I have not been successful in pulling records by date using traditional SQL (#9/26/2006#). The field in the Teradata table is a DATE field, so I am not sure what I am doing wrong. Any ideas? Thanks!!
 
Use the current date and subtract 1, you don't need a parameterized query:

Select * from Tab1
Where Tab1.datecol = Current_date - 1;
 
Thanks for the quick response, Bill. However, Access does not recognize the Current_date function. Our goal is to pull data from Teradata tables into Access directly, without having to use SQL Assistant. Is this possible? Thanks again!
 
Access does have a current_date function, DATE(). The following was put in the Criteria Row of the query design wizard: >=Date()-30.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top