Home Forums SQL Server 7,2000 T-SQL Break up full name col into fname, lname cols RE: Break up full name col into fname, lname cols

  • quote:


    You don't say anything about the quality of

    I work with a lot of crappy name & address info we get from clients, and I would be careful assuming it doesn't already have periods that would screw up the PARSENAME the name fields. If they're clean, the PARSENAME function is a great approach.approach. Any "Mr." or "Mrs." or "Dr." prefixes in these names?


    You can use REPLACE a few times with PARSENAME to take case of periods in the data.

    Again, any approach will almost certainly give some bad results unless the data is oversimplified. As I wrote previously, my last name is two words; I don't appreciate people misspelling my name just so it fits their model of how names should be spelled (i.e. with no spaces). As Frank mentioned, the real issue here is that the schema was not normalized, and now you're attempting to fix it without all the necessary information.

    --Jonathan



    --Jonathan