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!

need to generate a unique number for each new record ?

Status
Not open for further replies.

belcom125

Programmer
Nov 17, 2004
45
CA
I need to generate a unique number besides the autoincrement ID field that will be a unique alphanumeric order number, maybe even in sequence to look better say... ABCD0001 format
 
What database are you using? Does it support INPUT triggers?
 
Oh I am sorry, forgot to mention... I am using SQL 2000
 
Do you have the SQL Server Books Online? If so check out the entry for CREATE TRIGGER.

Basically you want to create a trigger FOR INSERT on your table. You can calculate your value in the trigger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top