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

Unique Record Numbers

Status
Not open for further replies.

bob120579

Programmer
Feb 9, 2005
42
US
I have a request for a file that contains a field for a record identifier. This field must be unique per record per file. Now to assign this number I obviously can't create a regular query, and I am thinking a cursor is the best way to go to access each record one at a time. I am thinking of defining a variable and incrementing the count per record, and then setting the field to the variable. What is the best way to set this cursor up?
 
Use an identity column. You can seed and increment as you need. Check books on line.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top