Better idea... create an SSIS package that will run as a scheduled task and recreate the view every day.
>Hi,
>Can I create a view (dynamically) from C# code? Here is a simple example:
>DB has a table Equipment with the following columns:
>Eq_ID Char(15)
>Eq_Desc Char(40)
>IncInView Bit
>
>I need to make a call from C# (ASP.NET) and create a view that will have the following:
>Eq_ID
>Eq_Desc
>Only those rows that have InInView set to 1
>And name this view, for example, EQ_2015_02_17
>
>Ideally I would like this view to "auto destroy" the next day.
>
>TIA for any help.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer