Parameters
I have a problem in SQL Reporting Services.
I have several multi-value parametersI
When I use one single value in parameter and running the report work fine, but when I select more then one value in the parameter (With Multi Value ) it fails:
"An error occurred during local report precessing. Query execution failed for dataset "DataSet" incorrect syntax near ',' "
thanks
OK, do you want us to read the whole query ? As you are more involved in the logic of the query I would suggest you turning on the profile to see what is actually fired against the SQL Server database. But as from a first view you are using multivalue parameters like singlevalue and multivalue together in @pzona = 0 and (@pzona in @Pzona whatever that means)
Using the profiler will help you to find your answer to that syntax problem.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
I have a problem in SQL Reporting Services.
I have several multi-value parametersI
When I use one single value in parameter and running the report everything work fine, but when I chose more then one value in the parameter (With Multi Value ) it fails:
"An error occurred during local report precessing. Query execution failed for dataset "DataSet" incorrect syntax near ',' "
thanks
You need to make sure that your SQL query in the DataSet uses the "IN" clause instead of "=".
For ex.
Select ColumnA,ColumnB,ColumnC from MyTable
where ColumnA in (@Parameter)
That error could mean that you are trying to use the IN syntax but the parameter values are of character/string type.
If so, please see this thread -- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1705421&SiteID=1 -- it's a little involved, but you need to split the set of multiple parameters up and put them back together with string delimiters...
>L<