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

Access table deleting 5 out of 6 records

Status
Not open for further replies.

jmshik

Technical User
Feb 7, 2002
7
0
0
US
I have an access table with a DateTime (dd.mm.yyyy hh:mm:ss) primary key, that consists of data, collected every 6 minutes. For several weeks in April, there was some data collected every minute.
I need to strain that data (using SQL) to every 6 minutes as the rest of the table.
Anyone out there have a clue with this?
 
Depends on how accurately it is to the minute. If, for instance, it is spot on and you want to only have 0,5,10,15 etc mins something like this would do. (zero points for elegance)

DELETE * FROM Table WHERE
format(MyDate,&quot;nn&quot;) <> 0 AND
format(MyDate,&quot;nn&quot;) <> 5 AND

And so on. Personally I'd copy the database first. Peter Meachem
peter@accuflight.com

Support Joanna's Bikeathon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top