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 2005 Forums
 Transact-SQL (2005)
 Obtaining data from extended stored procedure.

Author  Topic 

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2008-02-20 : 07:13:25
Hi folks.

I have a extended stored procedure which returns me some data in table. It works when I call it like this:

exec xp_MyProcedure


But how to for example join data from this procedure with some table?
Do I have to insert date from it firstly to some temporary table or is there an easier way?

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-02-20 : 07:16:58
Does this work?

Create Table SomeTable
(
col1 varchar(10),
col2...
...
)

Insert into SomeTable
exec xp_MyProcedure

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2008-02-20 : 08:30:56
Yeah it works but I asked if there is an easier way ;-)
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-02-20 : 08:32:59
See if this helps: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85347

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2008-02-20 : 09:21:39
Thanks for the link, this is great :-)
Go to Top of Page
   

- Advertisement -