Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Script Required

Author  Topic 

davidhydro
Starting Member

4 Posts

Posted - 2014-04-10 : 04:09:09
Hi,

I need to tidy up my companies account codes within their ERP system. Current format is SUPPLIERA, SUPPLIERB, SUPPLIERC etc. what i've been asked to do is concatenate them to SUPP001, SUPP002, SUPP003 and with any new ones taking the next incremental number.

Is there such a script that will look at a particular field, take an instructed number of characters, then add a number at the end of the record?

edit: moved to proper forum

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2014-04-10 : 04:29:01
The methods shown at this post will help you http://beyondrelational.com/modules/2/blogs/70/posts/19496/generating-alphanumeric-serial-numbers.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -