What sort of syntax should I be using for the following scenario:
Select * from vs_hgo_contributions where campaign in (@camp)
I've clicked the multi-value checkbox under the properties for the @camp report parameter so that people may choose more than one. Do I need single quotes around it? How does Reporting Services insert that code in there in the aforementioned case, as text? numerical values separated by commas? Me not know. Me am ignorant.
Thank you in advance for your assistance, Tessiturians.
THIS DAY IN HISTORY: The first colonial constitution (1639).
No takers on this one, eh? Oh well.
Two options for you Matt:
Select * from vs_hgo_contributions where campaign in (select element from dbo.FT_SPLIT_LIST(@camp,',')
or
select * from vs_hgo_contributions
where charindex(','+convert(varchar,campaign)+',' , ','+@camp+',') > 0
Hope this helps.
David