computed column formula

Is it possible to retrieve the formula associated with a computed column using t-SQL? I can use COLUMNPROPERTY( id, column, 'IsComputed') to find the computed columns, but how do I get the formula itself?

Thanks,

Mable

[239 byte] By [Mable] at [2007-12-22]
# 1

sp_helptext 'TableName', 'Computed Column Name'

For eg


CREATE TABLE T(i int, j AS i *2)

INSERT INTO T(i) VALUES(10)
SELECT * FROM T

sp_helptext 'T', 'j'

Roji.P.Thomas at 2007-8-30 > top of Msdn Tech,SQL Server,Transact-SQL...
# 2

Thank you! That is just what I needed.

--Mable

Mable at 2007-8-30 > top of Msdn Tech,SQL Server,Transact-SQL...

SQL Server

Site Classified