View Full Version : generating 0000 increment
galvatron
05-23-2003, 11:19 AM
yo yo yo my gods in the house. please tell me how do I do this with asp and sql. I need to make a product ID that starts with 0000 and increments. not automatically though. It's I do one table with the 0000 value, everytime I add 1 it goes 0001 0002 0004 till 9999. so howsitgoes? please meng. aight thanks in advance.
galvatron
05-24-2003, 12:52 AM
upping. please peoples I need this.
Zebulin
05-25-2003, 11:21 PM
oldid = rs("id") '0000 ?
newid = right("0000" & (cint("0" & oldid) + 1) ) ' 0001 !
what say..
sunpost
05-26-2003, 01:21 AM
close...
newid = Right("0000" & (CInt(oldid) + 1), 4 )
galvatron
05-26-2003, 10:30 PM
thanks a lot guys.
vBulletin v3.0.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.