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)
 filtering output of a stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-04 : 07:43:22
Avinash writes "Hi,

I have a sp which accepts two params and returns a recorset.

So when I call it like:

exec mysp 1,'a'

I get some rows out of it.

I now want to limit the output of this SP by applying a where clause.

Thanks in advance,
- Avinash"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-04 : 07:57:31
Create a temp table and insert the result from the SP there. Now select from the temp table with the WHERE criteria as you like.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-04 : 08:01:45
"I now want to limit the output of this SP by applying a where clause. "
Can you add the where clause inside the SP ?


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-04 : 12:12:23
quote:
Originally posted by khtan

"I now want to limit the output of this SP by applying a where clause. "
Can you add the where clause inside the SP ?


KH




I think this is what questioner has to do

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -