Groups | Blog | Home
all groups > sql server reporting services > march 2006 >

sql server reporting services : syntax error converting nvarchar to int


joshua
3/8/2006 9:17:26 AM
When I try to pass multiple values to a parameter in my dataset, I'm getting
this error:

Syntax error converting the nvarchar value '474 Or 347' to a column of data
type int.

Any ideas?

Bruce L-C [MVP]
3/8/2006 11:59:07 AM
Is this a query or a stored procedure?

In a query if the query looks like this:

select somefield from sometable where anotherfield in (@MyParam)

RS will automatically handle everything. If you have the above then the
issue might be that you have defined the parameter as text instead of int.
Go to layout, Report menu -> Report Parameters and make sure the datatype of
the parameter is correct.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

toolman
3/9/2006 11:19:34 AM
Also, try replacing the or with a comma e.g. '474,347'
suslikovich
3/16/2006 11:10:51 AM
I have the same issue. I have a parameter @TotalNumber. I have three
values. For each value I enter a query like

select ProspectID from Prospect

I can't change the type from srting to int since RS does not allow
that.

Any ideas?
Thanks,
Stan
AddThis Social Bookmark Button