Hi,
I have a number x = 4653. I want to keep adding the individual numbers from x until I get the single digit number. Like x = 4+6+5+3 = 18 and then 1+8 = 9 which is the final number I want. The x might vary in length. It could be 1 or 25 or 98759937. Is there any function in Transact sql to do that? Any suggestion is welcome.
Thanks in Advance
ndp
I have a number x = 4653. I want to keep adding the individual numbers from x until I get the single digit number. Like x = 4+6+5+3 = 18 and then 1+8 = 9 which is the final number I want. The x might vary in length. It could be 1 or 25 or 98759937. Is there any function in Transact sql to do that? Any suggestion is welcome.
Thanks in Advance
ndp