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.
| Author |
Topic |
|
slaws
Starting Member
9 Posts |
Posted - 2007-06-20 : 10:05:15
|
| Hey everyone,Is there a way to write the results of a stored procedure to a table?I have a procedure that launches an SSIS package using the exec master..xp_cmdshell command. Everything runs fine and the results of the process are listed in a table format when finished. The problem is that when I launch the procedure remotely from an application I have no idea whether the procedure succeeded or failed.Any ideas? Thanks in advance for your help.Scott |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-20 : 10:09:22
|
You can create table to match the format of the resultset returned and use INSERT INTO Table EXEC sp-name command to store the results to a table.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-20 : 10:10:30
|
| Create table #temp(col1 ........)Insert into #tempEXEC your+procedureSelect columns from #tempNote that the structure of #temp should be identical to the result returned by procedureMadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-20 : 10:11:04
|
MadhivananFailing to plan is Planning to fail |
 |
|
|
slaws
Starting Member
9 Posts |
Posted - 2007-06-20 : 10:17:16
|
| Awesome, Thanks for the repliesScott |
 |
|
|
|
|
|