![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Based on a single query, I need to output the row data to different files depending on a specific column value. For example: Query results Symbol Shares Exchange --------- -------- ---------- MSFT 1000 XNAS --> write to XNAS.csv DIA 500 XNYS --> write to DIA.csv AAPL 750 XNAS --> write to XNAS.csv I am not sure how to set this up. My initial thought was to set up a destination for a text file. Then in the ActiveX Main function to write out the data to the actual file then exit out of function telling DTS to skip the record. This would work but I am hoping for a cleaner solution. Any thoughts? Thanks, Jason |
#3
| |||
| |||
|
|
Is this all stored in a database in which you can issue SQL Statements with a WHERE Clause. Yes? Use n individual datapump tasks. It will be quicker. |
#4
| |||
| |||
|
|
In message <#hmgH8#9DHA.1392 (AT) tk2msftngp13 (DOT) phx.gbl>, Allan Mitchell allan (AT) no-spam (DOT) sqldts.com> writes Is this all stored in a database in which you can issue SQL Statements with a WHERE Clause. Yes? Use n individual datapump tasks. It will be quicker. I would use the WHERE clause option, but I'd be tempted to use a single DataPump task, and drive it of a recordset in a loop. Have a look at this sample, but replace the bulk export task with a DataPump, and parameterise the WHERE clause filter. -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#5
| |||
| |||
|
|
My problem is that I do not know beforehand what n would be. So I would not know how many datadumps to create. (Unless I got a distinct list and dynamically went through list creating pumps) - Jason "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:$J+LLhA5HzNAFwEb (AT) sqldts (DOT) com... In message <#hmgH8#9DHA.1392 (AT) tk2msftngp13 (DOT) phx.gbl>, Allan Mitchell allan (AT) no-spam (DOT) sqldts.com> writes Is this all stored in a database in which you can issue SQL Statements with a WHERE Clause. Yes? Use n individual datapump tasks. It will be quicker. I would use the WHERE clause option, but I'd be tempted to use a single DataPump task, and drive it of a recordset in a loop. Have a look at this sample, but replace the bulk export task with a DataPump, and parameterise the WHERE clause filter. -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |