Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Unanswered: How to add two values of computed columns?

    Hi folks,

    Could somebody guide me with example how can i add the values of two computed columns to make a third computed column?

    I am using SQL Server 2005 dev. edition.

    Thanks & Regards,

  2. #2
    Join Date
    Aug 2004
    Dallas, Texas
    You wish to populate an existing column in a table or create a new column in an extract? Makes a difference if we knew the intended purpose and ddl or dml expectations.

  3. #3
    Join Date
    Jan 2003
    Nottinghamshire, UK
    You cannot make a 3rd Computed Column with the results of two existing computed columns.

    BOL Says "The expression can be a noncomputed column name, constant, function, variable"

    I think you'll have to recalculate/concatenate your two columns formula to make up your third

    ((formula1) + (formula2)) in 3rd Computed Column
    "Everything should be made as simple as possible, but not simpler." - Albert Einstein
    "Everything should be made as complex as possible, so I look Cleverer." - Application Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts