Deleting Rows In a Database

  • Thread starter Thread starter carl
  • Start date Start date
C

carl

I have a database that has a date field in it - formated as text -
20110414.

Is there a qry I can use to delte all records that have a given date
- would be great if the query prompted me to input the date.

Thank you in advance.
 
carl said:
I have a database that has a date field in it - formated as text -
20110414.

Is there a qry I can use to delte all records that have a given date
- would be great if the query prompted me to input the date.
Of course there is.
1. Back up your database!
2. Create a query on the table. In the Query menu, change the query type to
Delete.
3. Drag the "date" field down into the grid
4. In the Criteria row, enter (the brackets are important):
[Enter the date in yyyymmdd format]
5. Run the query to test it
6. Save the query

The sql would look like:
delete * from tablename where datefield=[Enter the date in yyyymmdd format]
 
Back
Top