Math Formula in a Variable

  • I think what the original poster actually needs here may be a computed column. If all the fields referenced are in the same table, then adding a computed column solves the problem. If this isn't the case, the original poster will have to create a temp table with all the columns needed and then add a computed column to it. That would have to be easier than trying to interpret a formula from within T-SQL. This might be the ONLY way, as the OP has a table full of these "formulas", so the key is to get the formula into dynamic SQL that can create a computed column in a temp table, based on the formula.

    Steve

    (aka smunson)

    :):):)

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing post 16 (of 15 total)

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