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

Auto numbering format

Status
Not open for further replies.

makumbi

Programmer
Mar 15, 2011
12
UG
Hi members iam using sql server 2000

i have a table named catecodes
with the following colums
bookcodes
and the format of coding is
0001-0001
0001-0002
0001-0003

or
0002-0001
0002-0002

etc

is there a code in sqlserver 2000 i can use to automatically generate these numbers in this format without typing them manually
where by the user just enter 6 and then the code increments these number up to that number in put.
 
No,
SQL Server can't handle such increment internally.
You must do it by yourself.
You could write a function which could handle it and set it as a default value to this field.

Borislav Borissov
VFP9 SP2, SQL Server 2000,2005 & 2008.
 
It the user is entering it that is normally handled by a front-end program. What are you using to allow the user to enter data?

Simi
 
hi simian336 iam using access project(ADP) as my front end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top