back soft

مطالب مرتبط با «dynamic sql generation for the updatecommand is not supported» در back soft | نویسنده: استخدام کار

dynamic sql: the printed sql worked, but EXEC not work

Vote count: 0 Hi I wrote a stored procedure with dynamic sql. The dynamic sql throws error when I call it when arguments: IF OBJECT_ID('[dbo].[find_most_frequent]') IS NOT NULL DROP PROCEDURE [dbo].[find_most_frequent] GO CREATE PROCEDURE [dbo].[find_most_frequent] @table_in VARCHAR(100), @table_out VARCHAR(100), @col_group VARCHAR(100), @col_2 VARCHAR(100) AS BEGIN DECLARE @sql NVARCHAR(4000); SET @sql = --start of code 'USE CTR GO IF OBJECT_ID(N''[dbo].[two_columns]'', N''V'') IS NOT NULL DROP VIEW [dbo].[two_columns]; IF OBJECT_ID(N''[dbo].[count_in_group]'', N''V'') IS NOT NULL DROP VIEW [dbo].[count_in_group]; IF OBJECT_ID(N''[dbo].[rank_in_group]'', N''V'') IS NOT NULL DROP VIEW [dbo]....

ادامه مطلب

برچسب‌های مرتبط

dynamic sql generation for the updatecommand is not supported | dynamic sql must declare the scalar variable | dynamic sql must declare the table variable