July 4, 2011 at 7:08 am
Hi
How to change the view definition ?
I have a table with all columns having not null values when I create a view on this my all columns are not null for the view. while as if i use a common table expression to get the data from same table and create a view on top of the CTE . My view definition is displaying Null as default value .
How i can change this CTE view definition so that it will show not null as view definition.
July 4, 2011 at 8:09 am
amit_adarsh (7/4/2011)
HiHow to change the view definition ?
I have a table with all columns having not null values when I create a view on this my all columns are not null for the view. while as if i use a common table expression to get the data from same table and create a view on top of the CTE . My view definition is displaying Null as default value .
How i can change this CTE view definition so that it will show not null as view definition.
Gosh... I guess I really don't understand the question. Views can't have cannot have column defaults... only code.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 4, 2011 at 8:16 am
Use ISNULL() to assign a non-NULL value?? :ermm:
July 4, 2011 at 8:20 am
usually when i have this issues , dropping and re-creating the view seems to solve it.
unless the CTE is manipulating the column in some way it should have the same defaults as the source table
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply