• ScottPletcher (9/24/2012)


    Agreed.

    For example:

    ALTER TABLE dbo.tablename

    DROP COLUMN Full_Name;

    ALTER TABLE dbo.tablename

    ADD Full_Name AS CAST(ISNULL(F_Name + ' ', '') + ISNULL(Lname, '') AS varchar(100))

    -- change 100 to whatever max length you want for the column

    It would take a little more space but I recommend adding the PERSISTED hint.

    --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)