Hi im a beginner in SQL and new here at the forum.
I have a problem trying to create a function where we use modulus-10 method.
its creating a SSN using this method
Multiply the numbers by year of birth, month, day and number alternately by 2 and 1.
Add the numbers in the products. In numbers exceeding 9, the numbers are added, e.g. 12 is calculated as 1 + 2.
Subtract the singular digit from the number from the number 10.
The residual digit becomes the control digit.
If the remainder is 10, the check digit becomes 0.
So i want to Create this by either
yyMMddXXXX
or with a hyphen in between
yyMMdd-XXXX
Thanks in advance