I have an ssn column that some times has a valid 9 digit ssn, sometimes has format characters, sometimes has "garbage" (including less that 4 characters as it is a test database), null, etc. I would like to write a substring statement that will
return the last 4 digits of the ssn if it is valid. What would be the best way to do that in t-sql?
View Complete Post