Tuesday, November 29, 2011

Update stored procedure for multi value parameter


Create procedure SP_UpdateMultiValueParameter
(
@condition_field_commasplitted nvarchar(max)
)
as
begin

update table_name set [update-field]='value' where condition_field in (select * from dbo.fnSplit(@condition_field_commasplitted,',')) 
--Use custom split function available in this same blog
end

No comments:

Post a Comment