SQLTeam.com | Weblogs | Forums

Stored Procedure to generate random number with First three digit having logic & last checksum

I want to create unique number for 10 crore data with 12 digits having first ABBXXXXXXXXC where A is defined, BB is coded with 2 digit let say 01,02,27,32 & XXXXXXXX is random numbers generate 0-9 numeric form & C is checksum to lock the Number.
This is Unique throughout the data having 1 unique ID in whole data but data is available in multiple Tables.
I need to generate the ID with maintaining log

You should be able to use NEWID() for this