Re: Column Persisted Problem
What does the line
Code:
Total AS (Table1.Quantity * Amount) PERSISTED
supposed to do? I can see that it is trying to multiply the value of Table1.Quantity with the value of Amount but when you are designing it manually where are you setting such PERSISTED information?
And what database is this?
Re: Column Persisted Problem
The expression of a computed column can only inlcude other columns within the same table. The expression can be the result of a scalar udf function and can be persisted if the udf is considered deterministic (always returns the same result with the same parameters).
So you can do what you want by using a udf, although based on what you posted it seems like a ridiculous method to use. Describe the business problem you are trying to solve and maybe we can offer some alternatives.