Delete an excel column in a dts

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi All:

1. I am generating an excel work*** in my dts using an execsqltask.
The thing is i am creating all 30 columns that could possibly have
data.

2. The columns that need to be populated are based on one column
called OutputType. So if value in OutputType is A, i need to populate
columns 1, 2, 3 and if OutputType is B, i need to populate columns 1,
2, 3, 4, 5.

So i am left with two choices.

Based on OutputType which i can get by a query into the database, i
can generate this excel work*** described in step1, with only 3
columns or all 5 columns . How do i do this ?

The excel *** is generated within an execsql task, but the
connection is to an excel file and the query reads
CREATE TABLE `output_work***` (
`Col1` Long ,
`Col2` Long ,
`Col3` VarChar (18) ,
`Col4` VarChar (100) ,
`Col5` Long )

i am not able to specify , if then else clause as the connection is
to an excel file and it is not able to understand these comments.

so i am not sure, how i can accomplish this and if anyone can help
me,that would be great.

Alternatively, i can delete all not-needed columns at the end, from
the output-work*** ?

Please suggest either solution to my problem

thanks
RS

.


Quantcast