请在大量关于类似主题的文章中,有人可以提出将 nvarchar 输入参数(逗号分隔)传递给下面的存储过程的解决方案:
create PROCEDURE [dbo].[MyStoredProcedure]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
merge MyTableName as target
using (select OutputColumn, LastName, RegID from MyTableName WHERE Column1 = '036A' AND RowID=998) as source
on ( target.RowID>998 and target.LastName = source.LastName)
WHEN MATCHED THEN
UPDATE SET
target.OutputColumn=source.OutputColumn;
select * from MyTableName
END
请问,完成它的最简单方法是什么?(sql server 2008 r2)