Your right, with a slight modification to support numeric id's it will work (as shown below). Not sure if this method is more efficient than the solution I used as with the conversions SQL would not be able to use index, however for small tables a good alternative.
Thanks.
select * from...
Many thanks to all those that took the time to respond. I have copied how I am using it for any others uing SQL Server '97 to use it.
CREATE PROCEDURE BuildList
( @Array varchar(1000))
AS
begin
declare @separator char(1)
set @separator = ','
declare @separator_position int
declare...
As I mentioned before, I was trying to come up with a solution that uses static SQL for performance reasons. I'm just surprised that there isn't a solution to support. The previous link has some advantages of using static, but could be costly as it needs to insert records.
It almost defeats having a stored proc. Are you saying it can't be done or is this just a workaround?
Thanks for the suggestion anyway, maybe I'll go with that.
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...
I'm not sure if that's just the case, as I only see a few of these each day. I'm not sure if it's more related to something I'm not releasing and therefore that's why it tears down the sesssion.
I'm interested in how you were able to identify and fix the initial problem you stated. "After much investigation we saw in task manager that one of the mtx.exe processes kept on grewing until none of the users could log onto the app anymore. This was fixed and everything seemed to be...
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.
I do no set the timeout to 0, as this affects all packages in MTS. You can turn off transaction support for a particular package, and then it will not timeout. You will have to manage your own transactions here though.
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.