• Lynn Pettis - Friday, March 15, 2019 8:32 AM

    roger.plowman - Friday, March 15, 2019 6:50 AM

    Jeff Moden - Thursday, March 14, 2019 9:29 PM

    roger.plowman - Wednesday, March 13, 2019 6:49 AM

    Of course, you could always take the brute force approach. 🙂

    Create a table with all valid SSNs and set up a left join to it.

    By today's standards a table of all valid SSNs wouldn't be that big (< 1 billion records of 1 int field as clustered index). Of course it might take a few days to generate, based on how many rules you want to include, but once finished you never have to do it again!

    Kind of like a rainbow table used for the power of good!

    But first, stop storing the damned things in an unencrypted fashion. 😉

    Better yet, stop storing the damn thing AT ALL. Personally, the idea that an SSN is some super-sekret uber-key to steal somebody's identity is just STUPID, in and of itself. I get that it's got historical inertia, but when we depend on a *publicly used* ID to establish one's identity, along with other *publicly used* information, well, words fail me.

    We've never correctly solved the authentication problem and may never, but until we do, requiring SSN for anything than its original purpose is just criminal.

    Besides, isn't there a federal law prohibiting the use of SSN as an identification number?

    The Social Security Act itself states that the SSN cannot be used for identification.

    Which is bewildering because the feds require it for tax transactions and tracking.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)