Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Passing parameters to a stored procedure:

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-19 : 08:57:34
Sushama writes "Hello,
I am having the following problem while passing parameters to stored procedure.
I am calling stored procedure through MS Access and passing parameter which is a string generated in Access.

For an example I am writing my code below:

CREATE PROCEDURE procMYCODE
@PLINE varchar(500)
USE Northwind
BEGIN
select * from categories where categoryName in (@PLINE)
END

The @PLINE parameter comes from MS Access which is a string
eg. "'Beverages','Condiments','Confections'"

I get empty resultset because of the double quotes in this string.

Could you suggest me how should I pass parameters to the IN clause in the stored procedure?

Thanks"
   

- Advertisement -