UPDATE with sequential numbers? 
Author Message
 UPDATE with sequential numbers?

I need to update a a field in a sorted recordset with *sequential* numbers
(i.e. first record =1, second = 2 ,last = recordcount).  I'm currently doing
the following:

   i = 0
   Do Until rst.EOF
      i = i + 1
      rst.Update "Sort", i
      rst.MoveNext
   Loop

In order to imporve performance, I'm wondering if there is a way to
accomplish the same thing using a single UPDATE query (e.g "UPDATE table SET
Sort = x ).  Obviously "x" would need to *increment* for each row updated.

Any ideas?



Wed, 15 Oct 2003 00:46:43 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Adding a sequential date count number to an imported table

2. Get records if sequential numbers are found

3. Sequential numbers in labels

4. Sequential Numbering in Query

5. Sequential Numbering

6. Create a sequential stock number ???

7. How to generate a sequential number for each new form

8. generating a unique (sequential) number to subject line

9. massaging the format of sequential numbers

10. Printing Sequential Page Numbers

11. Creating Sequential Numbering in Labels

12. Generating Sequential Numbers

 

 
Powered by phpBB® Forum Software