I tried followed syntax in jasper studio (Note Parameter Class is 'java.lang.String')
SP_Name $P(Parameter)
and also tried
SP_Name $P!(Parameter)
and I have a stored procedure like by following
ALTER PROCEDURE [dbo].[SP_Name ] @Parameter VARCHAR(50) AS BEGIN SELECT * FROM tablename WHERE id IN (@Parameter) END
while trying the above scenario i got the following error in jasper studio
> procedure have too many arguments
or
> Conversion failed when converting the varchar value '1,2' to data type
> int.
please provide a proper solution for this..
Thanks in advance...
3 Answers:
As previous poster indicated, the procedure is invoked using "call <stored_proc_name>(<arguments>)". I'd suggest first to try to simplify the query, remove the parameters and see if that runs successfully for you. Then add the parameter. It seems there is an error here in executing the SQL statement, I am not sure what value you pass with the parameter.