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)
 SP WITH IN SP'S

Author  Topic 

xpandre
Posting Yak Master

212 Posts

Posted - 2002-02-08 : 08:23:00
Hi guys,
Suppose 1 Sp of mine say s1 returns a table with 2 columns
and i need to use the values returned in another sp say s2
like
s1--->returns 1,1
and i need to use this 1,1 in s2
how do i do this?
thank you
sam

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-02-08 : 08:32:28
Hi

You need to insert the values into a temp table.



Declare @val1 int,
@val2 int

Create Table #temp )
val1 int,
val2 int
)

Insert Into #temp (val1, val2)
Exec MySP

Select @val1 = val1, @val2 = val2 From #temp

Drop table #temp




Hope that helps

Damian
Go to Top of Page
   

- Advertisement -