Solved

Access query that uses a dynamically created date

Posted on 2008-06-26
2
215 Views
Last Modified: 2013-11-27
I apologize if the question title wasn't appropriately named, but it was hard to try to come up with the words.

I want to create an Access query that deletes any record in a table that is older than 30 days ago from the current date.

I'm familiar with writing SQL statements, but not one that would use a variable type element as with this example.

Is there a way to do this in Access?
0
Comment
Question by:zrancidr
2 Comments
 
LVL 18

Accepted Solution

by:
jmoss111 earned 250 total points
ID: 21875094
If you have some date in the table that contains the reference date then "DELETE * FROM MyTable WHERE MyDate < Date() - 30;"
0
 

Author Closing Comment

by:zrancidr
ID: 31470968
I should have just gone ahead and tried to do that myself...that was my initial inclination.  Thanks!!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
string fuctions 4 25
Dlookup MSACCESS 5 24
Sql Server group by 10 23
Setting Macro in Access to Automate Running an Append at a Certain Time 2 17
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now