Last active
August 29, 2015 14:09
-
-
Save ststeiger/662da186bf9543fee09d to your computer and use it in GitHub Desktop.
Generate pseudo-random key-inventory-hook-number in Range 0-999 with 4 digits 0-padding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
RIGHT('0000' + CAST(ABS(CHECKSUM(T_KeyGroup.KG_No + '.' + T_Key.Key_No)) % 1000 AS varchar(10)), 4) AS RPT_Hook | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment