I am running SQL Server 2005 on prod, but developing in 2008, and I need to change the view to add a column. However, I am unable to create the deployment script because I need to wrap it in a transaction like this
begin tran; alter view [dbo].[v_ViewName] with schemabinding as select ... commit;
When I do this, the SQL IDE underlines the alter statement with an error, stating that the ALTER VIEW statement should be the only statement in the package. ANd, if I ignore this and just try to run it anyway, it gives this error:
Invalid syntax next to the keyword 'view'.
Any ideas how to get around this?
source share