how to CREATE and UPDATE VIEW in SQL Server 2008 using single query -
i have 2 query. create new view , update view query.
1) vw_delay (new),
create view vw_delay select ....
2) vw_rdoc (exist)
alter view vw_rdoc select ....
i want run both query single query. tried run this,
create view vw_delay select .... alter view vw_rdoc select ....
but returns error:
msg 156, level 15, state 1, procedure vw_delay, line 7
incorrect syntax near keyword 'alter'.msg 111, level 15, state 1, procedure vw_delay, line 7
'alter view' must first statement in query batch.
how this? please me.
what necessary add go after first create view.
create view vw_delay select .... go alter view vw_rdoc select ....
then work.
Comments
Post a Comment