question

ModestasDromantas-7073 avatar image
0 Votes"
ModestasDromantas-7073 asked ModestasDromantas-7073 commented

is_computed property on view is not correct

A computed column on a table, which is used in view select list, sys.column is not giving correct is_computed property value even after sp_refreshView.


CREATE VIEW dbo.some_view
AS
SEELCT [Computed_column]
FROM dbo.some_table

In sys.columns Computed_column for view will be false, but for table it is true.

Is there any way to work around this? Are there any reasons why a computed property is not reflected, metadata as is_nullable works fine.

sql-server-transact-sql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

EchoLiu-msft avatar image
0 Votes"
EchoLiu-msft answered ModestasDromantas-7073 commented

The view is a virtual table, Computed_column for view is always false.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Was hoping that there might be some options on how to make it work, but Thanks, at least will just deal with it in other ways.. :)

0 Votes 0 ·