Prev: Updating text field to new numeric field & moving minus signto fr
Next: Reminder - Microsoft Responds to the Evolution of Community
From: inungh on 20 May 2010 10:19 I would like to delete first 3 records of the table. I know that I can set criteria to delete certain records in the table, but are there any way to set criteria only the first 3 or 4 records? Your information is great appreciated,
From: Bob Barrows on 20 May 2010 10:50 inungh wrote: > I would like to delete first 3 records of the table. > I know that I can set criteria to delete certain records in the table, > but are there any way to set criteria only the first 3 or 4 records? > > Your information is great appreciated, You really need to define the criteria to identify the "first" 3 records in your table. Records can be stored in an entirely different order from that with which they are displayed. In a relational database, tables are defined as sets of unordered rows. Without a numerically increasing row identifier (primary key), the best you can do is a 3-step process: 1. Add an autonumber field 2. delete * from table where autonumber_field < 4 3. Delete the autonumber field. -- HTH, Bob Barrows
From: KARL DEWEY on 20 May 2010 12:05 I suggest including two more steps -- Step 0- Backup database After step 1 add - verify the autonumbers of the records to be deleted. -- Build a little, test a little. "Bob Barrows" wrote: > inungh wrote: > > I would like to delete first 3 records of the table. > > I know that I can set criteria to delete certain records in the table, > > but are there any way to set criteria only the first 3 or 4 records? > > > > Your information is great appreciated, > > You really need to define the criteria to identify the "first" 3 records > in your table. Records can be stored in an entirely different order from > that with which they are displayed. In a relational database, tables are > defined as sets of unordered rows. > > Without a numerically increasing row identifier (primary key), the best > you can do is a 3-step process: > 1. Add an autonumber field > 2. delete * from table where autonumber_field < 4 > 3. Delete the autonumber field. > > -- > HTH, > Bob Barrows > > > . >
From: inungh on 20 May 2010 12:21
On May 20, 10:50 am, "Bob Barrows" <reb01...(a)NOyahoo.SPAMcom> wrote: > inungh wrote: > > I would like to delete first 3 records of the table. > > I know that I can set criteria to delete certain records in the table, > > but are there any way to set criteria only the first 3 or 4 records? > > > Your information is great appreciated, > > You really need to define the criteria to identify the "first" 3 records > in your table. Records can be stored in an entirely different order from > that with which they are displayed. In a relational database, tables are > defined as sets of unordered rows. > > Without a numerically increasing row identifier (primary key), the best > you can do is a 3-step process: > 1. Add an autonumber field > 2. delete * from table where autonumber_field < 4 > 3. Delete the autonumber field. > > -- > HTH, > Bob Barrows Thanks millions for helping, I find the way to identify the records without knowing order of the records. Thanks again for helping, |