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)
 SQL IN operator parameter problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-14 : 22:25:21
Mark Fletcher writes "Hi there,

I've a stored proc as below ( Using SQLSvr 7 sp 6 )

CREATE PROCEDURE test2
@pub_id varchar(1000)
AS


select * from publishers where pub_id in ( @pub_id )


If I execute the sp with

exec test2 'TH01-S2001-3'

I get row's back

If I run it with

exec test2 'LD01-S2001-1'

I also get rows back

However if I run like this

exec test2 "'TH01-S2001-3', 'LD01-S2001-1'"

It doesn't...!?

Thanks in advanced, Mark."
   

- Advertisement -