Is there any way to use SQL Server metadata to find columns in a view that are the result of calculations/expressions? The sys.columns
catalog view has the Is_Computed
field, but that's returning 0
for a few fields in one of my views that are the result of a CASE
expression, so I'm guessing it only works for calculated columns in tables. Is there any sort of similar metadata that works for views?
EDIT: What I'm trying to achieve here is an audit for some instead of
triggers. I have a number of views that I need to make updateable with triggers, and I want to ensure that every column in the view is accounted for in the trigger so no data is lost. The trouble is that my query is flagging fields that can't be updated because they're the result of a computation, and I was hoping to find a way to exclude these from my results.