Answer by Vince Pergolizzi for Creating a Non-Int and Non-Guid Unique Identifier
How are you inserting these new invoices to the table? A straight up batch insert or are you doing some business logic/integrity checks in a stored procedure first and 'creating' the invoices one by...
View ArticleAnswer by paparazzo for Creating a Non-Int and Non-Guid Unique Identifier
What is so confusing about the random part being unique? If you have a two digit invoice number there can only be 100 unique values (00 - 99). A GUID has 2 to the power 128 values and is statistically...
View ArticleAnswer by Rachel for Creating a Non-Int and Non-Guid Unique Identifier
I've never seen a randomly generated invoice number. Most of them are usually a combination of multiple identifying fields. For example, one segment might be the companyID, another might be the...
View ArticleAnswer by Aaron Bertrand for Creating a Non-Int and Non-Guid Unique Identifier
So you can do it this way, just don't expect it to perform well.(1) populate a big massive table with some exhaustive set of invoice values - which should be at least double the number of invoices you...
View ArticleAnswer by JNK for Creating a Non-Int and Non-Guid Unique Identifier
From comments, it sounds like you would be OK with using an IDENTITY field and padding it with 0s and adding a prefix/suffix. Something like this should work:1 - Add an IDENTITY field which will be...
View ArticleCreating a Non-Int and Non-Guid Unique Identifier
I'm looking for a way SQL Server can generate a unique identifier that is not an increment Int or a GUID.The Unique ID can be a combination of letters and numbers and has no other characters, and as...
View Article
More Pages to Explore .....