Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

errors when parsing multiple values in a dataset

$
0
0

I got this error when I parse multiple data to sql server for a report.  This error happens when I put the data line by line, if I manully separate the data by comma, it works fine. Here is my query which works fine in query designer.

DECLARE @sql varchar(1000) 

BEGIN

SET    @sql = 'Select pn_id,Count(pn_id)as Number  
       from dbo.pen_link_component
       where pn_id in ('+@userid+') and invitemlk_ky= 503569 
       Group by pn_id'
END 
EXECUTE (@sql)


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>