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

Change autonumber length

Status
Not open for further replies.

critical5

Programmer
Dec 13, 2006
37
0
0
GB
I have a table and with an increment ID which id now SN001 but i would like to add an extra 0 to make it SN0001...any idea how to do this??

I tried update like this
UPDATE CUSTOMERS
SET CUSTOMER_ID = "SN0+[CUSTOMER_ID,4]"

Thanks
 
update customers
set customer_id=concat(substring(customer_id,1,3),'0',substring(customer_id,4,2))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top