add a field called PK to your table, set it as a primary key, int, auto increment; the student_id field has to be a varchar (obviously) and when you go to insert data into that table set the a variable to the pk:
Set @pk = (SELECT MAX(pk) from [table])
That will return you the highest number now all you need to do is add the DU and pad it with the necessary rows.
hth.
"The one language all programmers understand is profanity."
|