hi
i want to pass a list of values string like in a dinamic query
DECLARE @Lines AS NVARCHAR(MAX) SET @Lines = 'PL1,PL2,PL3' SET @Query = ' WHERE ProductLines IN (@Lines) ...'
How can do that?
Hi jon,
Refer below link to split value using comma.
Refer below query.
SQL
DECLARE @Lines AS NVARCHAR(MAX) SET @Lines = 'USA,UK' SELECT * FROM Customers WHERE Country IN ( SELECT Item FROM SplitString(@Lines,','))
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.