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

Delete where not in top 16000.

Status
Not open for further replies.

Transcend

Programmer
Sep 29, 2002
858
AU
Hi everyone

I need some help with a delete query. Basically one of our applications uses an access database to run its reports off. The database is only a temporary one that gets populated on the fly.

I'm looking to be able to run a query like

delete from table
where tablerow not in
(select top 16000 tablerows from table)

There isn't a primary key on the table as it is just a dump of data.

Is this even possible?

Transcend
[gorgeous]
 
Hi again, i also want to know if there is a way i can delete all rows except for the bottom 16000 ?

Transcend
[gorgeous]
 
Ok completely ignore this question

sorry to have wasted anyones time!!

I'm going to create an index on the fly when the table is being populated

Sorry again

Transcend
[gorgeous]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top