The SQL syntax for a where .. in is
Where Name in ('Firstname','Secondname','Thirdname')
So you would need to Join your collection values with ',' into a string and add (' at the start and ') at the end
You should then be able to use this string in your Where expression
Sorry for the delay, I built a string and I get the following string:
('Bob','Julien','Tom')
So it's exactly what I need but during my querry I get the following error message:
Incorrect syntax near 'Bob'.
And here my query :
SELECT Role]
,,Name]
FROM dbo]..Stakeholders]
WHERE '{Common:ProjectUID}' = ProjectUID AND Name] IN {WorkflowVariable:MName}
If I replace {WorkflowVariable:MName} by ('Bob','Julien','Tom')
Any idea of what I'm doing wrong?
Try this
set MName to 'Bob','Julien','Tom'
Then make your query
SELECT [Role]
,,Name]
FROM Mdbo].]Stakeholders]
WHERE '{Common:ProjectUID}' = ProjectUID AND NName] IN ({WorkflowVariable:MName})
That is, make the brackets part of the query and not part of the string