PC Review


Reply
Thread Tools Rate Thread

Deleting Rows In a Database

 
 
carl
Guest
Posts: n/a
 
      15th Apr 2011
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.
 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      15th Apr 2011
carl wrote:
> 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]


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My database is deleting rows by itself?? Adele Microsoft Access Database Table Design 3 20th Oct 2009 01:53 PM
Deleting multiuple rows from a database... Brad Pears Microsoft VB .NET 4 12th Mar 2008 03:03 PM
deleting rows in large database (+20k rows) =?Utf-8?B?bXdhbTQyMw==?= Microsoft Excel Programming 4 9th Aug 2007 01:06 AM
ObjectDataSource Update command deleting rows from my database =?Utf-8?B?QW1pdA==?= Microsoft ASP .NET 1 17th Dec 2006 10:08 AM
Deleting rows in Access database table =?Utf-8?B?TWFyaw==?= Microsoft Dot NET 6 26th Apr 2005 02:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:27 PM.