Select into a view
common-table-expression, sql-server-2008, sql-view, t-sql
Solution
create view myView
AS
with x
as
(select 1 as num)
select * from x
Problem
I have a simple CTE `x` and I wish to select its contents into a view. Can you select into a view using the same type of syntax that you can for a table? i.e. ``` SELECT * INTO newTable FROM OldTable ``` Can new views be created dynamically like this?