I have a requirement where I want to pass multiple key values to select data from a table as below:
CREATE PROCEDURE a (@jobno varchar(100)) AS
select * from TabA where JobNo in (@jobno)
I cannot however pass in more than 1 key as it fails:
exec a '8002,8003'
Syntax error converting the...
If I view my event viewer, I occasionally see the above informational message in the Event Viewer Application Log, issued from MSDTC.
Is this something that is a potential problem, does it mean I am not freeing something correctly?
Thanks,
Dave.
Does anyone know how to pass a value into a stored procedure which can be used in an 'IN' clause. It works fine passing 1 value, but I cannot get it to work passing in multiple values.
Example:
Select * from Members
Where State_Id in ('FL', 'MA')
How can I pass 'FL', 'MA' as the parameter...
I want to be able to pass a parameter into a stored procedure to be used in an IN clause.
An example would be:
Select * from Members
Where State_Id IN ('NJ','NY','MD')
So I want to pass the states as a variable. Anyone know how to do this in either SQL Server or Oracle.
Thanks,
Dave.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.