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 derfloh 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
Joined
Dec 13, 2006
Messages
37
Location
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))
 
autonumber? increment? how do you populate new values into this column? just curious

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top