where 附近有语法错误????
alter PROCEDURE proc_insertSPL
@columnName nvarchar(50),@columnStr nvarchar(max),@splName nvarchar(50)
AS
BEGIN
declare @str nvarchar(max)
set @str = 'INSERT INTO MotorSPL ( ' + @columnName + ' ) values ( ' + @columnStr + ') where SPLName = ' + @splName
exec sp_executesql @str
END
GO
where 附近有语法错误
请问错在哪儿了???
谢谢谢
[解决办法]
insert into语句后面一般不用where
[解决办法]
set @str = 'UPDATE MotorSPL SET @columnName = @columnStr where SPLName = ' + @splName