Dear Friends,
Please guide me to generate a auto sequential number at the time of entry.
I want to generate a product ID say P001, P002, P003....... so on. At the time of entry of Master Product details it should generate.
thanks
Hemant
Generate a auto sequential number at the time of entry
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hemant Kumar3 reputationPosted Jul 31, 2012, 10:05 PM EDT
Anyone who can help me pleaseeeeeeeeeeeeeeeeeee ?
thanks
Hemant
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Jul 31, 2012, 10:54 PM EDT
Create table tbl_user( UserId varchar(10) ) insert into tbl_User values ('M001') insert into tbl_User values ('M002') insert into tbl_User values ('M043') select * from tbl_User Check my below stored proc Create proc asp_GetAutoincrementedId Begin Declare @MaxId int select @MaxId=MAX(SUBSTRING(Userid,2,LEN(UseriD)-1))+1 from tbl_user Select Case when @MaxId