Modifying a Column To Computed Column

  • Hello Friends,

    I have a situation i want to modify existing column to a Computed Column using Some Formula.

    and im not getting a way though Query.

    One Way is First dropping the Column & again add it with Formula.

    but is there any hope without dropping it.

    Thanks

  • without dropping it, the calculated column would need a different name; it depends on what you really need;

    since I would prefer not to delete delete data by dropping a column,i might think this logic would be what you want:

    1.rename the existing column. (sp_rename)

    2. add the column with the calculation.

    3. compare the calculation to confirm it is what you want.

    4. consider dropping the original column in a few months, after the system has been in place with the calculated column for a while.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply