Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Sergio Govoni,
The standard coding of UCC/EAN requires that each code generated ends with a check digit between zero and nine (0 - 9).
The check digit is calculated in according to the other digits that make up the code and its purpose is to ensure that the bar code is interpreted correctly by the optical scanner.
Calculate the check digit for the UCC/EAN code equal to "0800123456789"
DECLARE @RES INT
EXEC @RES = UDF_GetCheckDigitUCCEAN '0800123456789'
The result is: 7.
The UCC/EAN code with check digit is: '08001234567897'.
SQL Script compatible with Microsoft SQL Server 2000.
Check digit for BBGID code.
check digit calcualtion
Comments posted to this topic are about the item [B]Add Check Digit (LUHN)[/B]
If you ever need to create a credit card like number this stored procedure is for you.
Digital technologies have made the transfer of information easier than ever, but what about it's lon...