var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Create View using Stored procedure
I would like to drop and re-create a view using stored procedure. I try with the following codes for creating view. but some its not working.
How can I drop the existing view befor creating it?
Declare @sql_command nvarchar(4000)
Declare @ParmDef nvarchar(4000)
Declare @Branch int
Set @sql_command =N'Create view [vwacchart] as ( Select * from ah where ah1=' + @Pamvar + ')'
set @parmdef =N'@Pamvar int'
EXEC sp_executesql @sql_command,@parmdef,@Pamvar= @branch
Last edited by bijujoy123; 12-01-03 at 13:56.
N'Create view [vwacchart] as ( Select * from ah where ah1=' + @Pamvar + ')'
Or something like it. The text as shown in your post will not substitute in the @variable, but be parsed as meaning =@variable.