Unanswered: How to convert varchar datatype to int??
I am using a varchar datatype for PIN number to handle zero at start. Now i want to do mathematical calculation to encrypt the PIN so i need to convert that varchar datatype to int so that zero should not be discarted after conversion. i.e. 0123 and 123 must not be treated as same PIN.
Please kindly give me a way out. I am using RSA encryption.
well if you convert the varchar into int, int data type will always ignore the leading zero...so an integer data type will treat 0123 and 123 as similar.....because numerically both the values are the same....