title: “Only one expression can be specified in the select list when the subquery is not introduced with EXISTS” error?
body: <p>I wrote this query for a ssrs report dataset. The report works fine for single parameter value and error is populated when multiple values are selected for parameter. </p>
  
  <p>@iteration is a multivalued report parameter.</p>
  
  <pre><code>create table #hftable
  ( id int ,startdate datetime, environment nvarchar(50), iteration nvarchar(50))
  insert #hgtable( id , startdate,environment , iteration)
  select distinct wit.id, max(wit.startdate),environment , i.iteration
  from Workers wit 
  join iteration i 
  on wit.sckid=i.sckid
  and i.iterationlabel in (@iteration)
  where system_rev =(SELECT MAX(system_rev) AS system_rev
                FROM workers 
                WHERE system_id = wit.system_id)
  group by wit.id, i.iteration,environment 
  order by i.iteration
  
  select count(*) ,environment from #hftable 
  group by iteration,environment 
  order by iteration 
  </code></pre>