468,321 Members | 1,765 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

Output of SP1 stored procedure in #Temp TABLE OF SP2.

Hello ..

I want Output of SP1 stored procedure in #Temp TABLE OF SP2.

Something like this .......

CREATE SP2
@iLoginId INT
AS
BEGIN
SELECT *
INTO #Temp
FROM [SP1]

SELECT TOP 20
FROM #Temp

END

--Regards
Jan 30 '09 #1
5 2896
ck9663
2,878 Expert 2GB
If you create the temp table inside your stored proc, it will not be visible outside that stored proc.

There might be other ways of doing it. What are you trying to do?

-- CK
Jan 30 '09 #2
@ck9663
Hello

i am trying to SELECT TOP 10 recordes of output of SP1 from SP2.

-- Regards
Jan 31 '09 #3
ck9663
2,878 Expert 2GB
Try using a table function.

-- CK
Jan 31 '09 #4
@ck9663
Hello

Thanks for the reply.

With Table function problem is that i have to know table schema before creating table function.

But i am executing any sp [SP1 is name of stored procedure passed to SP2] so i dont know table schema.

so give me any idea..

--Regards,
Feb 3 '09 #5
ck9663
2,878 Expert 2GB
Could you oist some sample data and what you're trying to accomplish?

-- CK
Feb 3 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Thomasb | last post: by
1 post views Thread by peaceburn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.