I am new to SQL server so am looking for a bit of guidance (and hopefully in simple terms).
I have to create a pseudonymisation function to turn a 10 digit number into a 10 digit alpha string. This is then has to have an unlock function to be able to turn it back.
Basically it needs to be the first digit of the number can be 0 to 9. This would then equal the first to tenth digit of the alphabet (number 2 would change to the letter C). The next number digit would be the number of the letter between the eleventh and twentieth letter of the alphabet (number 3 would be the letter N). From then on the alphabet would have to repeat (i.e. U,V,W,X,Y,Z,A,B,C,D etc) to give the third number 7 = B (i.e. 28th letter).
Hope that makes sense. Can anybody point me in the right direction as I'm a total noob. I have to be able to pass the 10 digit number into a function to then return the output. This has to be able to be used in queries.
Thanks in advance for any help.
JP
I have to create a pseudonymisation function to turn a 10 digit number into a 10 digit alpha string. This is then has to have an unlock function to be able to turn it back.
Basically it needs to be the first digit of the number can be 0 to 9. This would then equal the first to tenth digit of the alphabet (number 2 would change to the letter C). The next number digit would be the number of the letter between the eleventh and twentieth letter of the alphabet (number 3 would be the letter N). From then on the alphabet would have to repeat (i.e. U,V,W,X,Y,Z,A,B,C,D etc) to give the third number 7 = B (i.e. 28th letter).
Hope that makes sense. Can anybody point me in the right direction as I'm a total noob. I have to be able to pass the 10 digit number into a function to then return the output. This has to be able to be used in queries.
Thanks in advance for any help.
JP