2
votes

I have stored procedure which runs perfectly. And when I insert it into query designer in MS Reporting Services, Ii have error:

Incorrect syntax near 'GO'. Incorrect syntax near 'GO'. Incorrect syntax near 'GO'. The variable name '@s1a' has already been declared. Variable names must be unique within a query batch or stored procedure.

As I said, procedure runs fine in MS SQL Server 2008.

Parameter isn't declared before.

Is there something that needs to be changed so procedure works in Reporting Services?

1
What we need to see is the code for your stored proc, and the code you are putting into the query designer.Purplegoldfish
Open your dataset. Change the query source to stored procedure. Select your stored procedure from the drop down menu.brian

1 Answers

2
votes

GO is not valid SQL. It is a marker for client tools.

Also, you do not post the stored procedure definition into SSRS designer. The stored procedure should already exist on the SQL Server. Only the execution call goes into SSRS designer.

I suspect we'll need a screenshot to see what you are doing with the code