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)
 Output to a excel file

Author  Topic 

beetle3379
Starting Member

11 Posts

Posted - 2010-10-26 : 16:33:27
Hello,

I have written a stored procedure that performs the joins and selects from multiple tables and then calls another stored procedure to insert the result into the database. I have the results dumped into a table variable before inserting. What I would like to do now is have the results of the table variable output to a text file as a record of what has been inserted. From what I have read, a table variable can't be used with OUTPUT. Another note is that I will be calling this stored procedure from a VBScript. Would it be better to do that in the VBScript? Any suggestions on how to accomplish this? I can provide the code of the stored procedure if it helps.

Thanks in advance,

Loren Bailey

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-10-27 : 02:07:28
Try this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

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

beetle3379
Starting Member

11 Posts

Posted - 2010-10-27 : 09:56:01
Great...I'll give those a try. Thanks a lot!

Loren Bailey
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-10-28 : 02:06:06
quote:
Originally posted by beetle3379

Great...I'll give those a try. Thanks a lot!

Loren Bailey


You are welcome

Madhivanan

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

- Advertisement -