Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Computed Column

Author  Topic 

Atif
Starting Member

9 Posts

Posted - 2007-02-16 : 02:03:45
I want to create computed column in table.
Suppose I have three physical column A,B and C
I want to create compute column with computed column.
A+B= X
X+C=Z
Is it possible.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-02-16 : 02:05:27
Yes.

Create Table abc
(
...
X as (A+B),
Z as (X+C)
)


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-16 : 03:05:25
Computed column 'X' in table '#abc' is not allowed to be used in another computed-column definition.

Create Table abc
(
...
X as (A+B),
Z as (A+B+C)
)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -