0

Using the below column names in the formula field of computed column specification category (using Management Studio).

[[App_1]+[App_2]+[App_3]+[App_4]]

I'm getting this error:

'MyDatabase' table
Error validating the formula for column 'Total'.

App_1, App_2, App_3, App_4 all are numeric values.

Anyone knows how to handle this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sixthsense
  • 1,927
  • 2
  • 16
  • 38

1 Answers1

1

You have to get rid of the enclosing square brackets ('[', ']'), use:

[App_1]+[App_2]+[App_3]+[App_4]

Alternatively you can try with an SQL script:

ALTER TABLE [dbo].[mytable] ADD [new_col] AS ([App_1]+[App_2]+[App_3]+[App_4])
Giorgos Betsos
  • 71,379
  • 9
  • 63
  • 98