![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Ok, I'm a relative newbie to dts... I need to take several relatively simple SELECT statements, i.e., select * from table_xyz where code = 'a' and insert the results into different cells within an excel row. The excel file is used by salespeople and others and the dts package of which the select statements are a part runs on a daily basis. Each row is a different day... Thanks in advance. |
#3
| |||
| |||
|
|
If by "different cells" you mean that you need to insert the values returned all over the Excel workbook then DTS is not really your tool. You need to use the Excel object model by the sounds of it. DTS sure can take a rowset from a query such as yours and insert into a named range/table but if those cells is distributed about the workbooko then IMHO you are better off using the Excel Object model from probably Excel. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "TC" <spam (AT) yahoo (DOT) com> wrote Ok, I'm a relative newbie to dts... I need to take several relatively simple SELECT statements, i.e., select * from table_xyz where code = 'a' and insert the results into different cells within an excel row. The excel file is used by salespeople and others and the dts package of which the select statements are a part runs on a daily basis. Each row is a different day... Thanks in advance. |
#4
| |||
| |||
|
|
*groan* I've had to learn waaay too much over the past two weeks... Before I go trotting down excel object lane, let me clarify, and see if you still concur about the excel object... I have 5 different SELECT statements, each which tallies a different quantity. In the spreadsheet, a row represents a day. As the package runs each day, an operator would have to go back, run each of the statements separately and enter them into that days row. i.e., query 1 total goes in 1st cell, query 2 total goes in 2nd cell, etc... I was hoping there was some simplistic way for dts to find the next blank row and insert the data from the queries in each cell. Does it still sound as if I need excel object model? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:Om8oCIycEHA.2352 (AT) TK2MSFTNGP09 (DOT) phx.gbl... If by "different cells" you mean that you need to insert the values returned all over the Excel workbook then DTS is not really your tool. You need to use the Excel object model by the sounds of it. DTS sure can take a rowset from a query such as yours and insert into a named range/table but if those cells is distributed about the workbooko then IMHO you are better off using the Excel Object model from probably Excel. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "TC" <spam (AT) yahoo (DOT) com> wrote in message news:2mkklmFma1nhU1 (AT) uni-berlin (DOT) de... Ok, I'm a relative newbie to dts... I need to take several relatively simple SELECT statements, i.e., select * from table_xyz where code = 'a' and insert the results into different cells within an excel row. The excel file is used by salespeople and others and the dts package of which the select statements are a part runs on a daily basis. Each row is a different day... Thanks in advance. |
#5
| |||
| |||
|
|
Am i right? |
#6
| |||
| |||
|
|
In which case you can use DTS. The Excel way of doing stuff is to append. The structure of DateRun,Value1, Value2, Value3 will appear as a table to DTS. |
![]() |
| Thread Tools | |
| Display Modes | |
| |