Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
NewSQL11
Starting Member
6 Posts |
Posted - 2014-08-23 : 16:23:09
|
Running into problems when I pass -MyVariable = 'One','Two','Three'to - select a.system, count(b.[Name]) SystemCountfrom [System] aleft join NameIndustry] bon a.system = b.systemwhere b.industry in ([MyVariable])group by a.systemorder by a.system Works as designed if 1 value but the multi value returns nothing except the standard expression of non-Boolean type near comma.I have read a lot on possible solutions but having a hard time following them as I want to understand the meaning behind a solution and see if with the expansion of technology if the possible outcomes have shifted.Any help would be appreciated. |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-08-24 : 08:44:41
|
In standard SQL, use dynamic SQL. If this is SSRs, there's another easier way |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|