Deleting Rows In a Database

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.
 
B

Bob Barrows

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top