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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-11-14 : 07:29:19
|
Sahrear writes "Dear all,I want to copy multiple resut sets, and then write it into a file. For example, i have more than one select command and i want to write all the result sets in one file. I need to create some daily report, on which everyday i need to run several select commands, so i need to write all those resultsets in one file. How can i do it? I tried with 'bcp' but it takes only one select command and others are ignored. Please advice..RegardsSahrear" |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-16 : 03:22:23
|
If the result sets are identical in datatypes and number of columns you can use Union All to combine them. Otherwise you need to have stored procedure that runs the query and write it to fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|