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)
 stored procedure with IN

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-09 : 13:43:38
nancy writes "Here is my stored procedure:
Create Procedure sp_retrieve_location
@strlocation varchar(50)
AS
Begin
Declare @SQL varchar(100)
Set @SQL='Select Location_name from tblLocation where CAST(Location_ID AS varchar(2)) IN (' + @strlocation + ')'
EXEC(@SQL)
End

and here is my ASP line calling that stored procedure.
objRS.open "exec sp_retrieve_location " & strLocation, objConn

As a test data, my strLocation is 2, 3, 5, 6, 7

I got error 80040e14
Too many arguments were supplied for procedure sp_retrieve_location

Can you please tell me what's wrong? Thanks!"
   

- Advertisement -