I created a simple SSIS package that takes data from a database using a query and dumping it to an excel file. I've added 2 "Excecute SQL Tasks" to the Control flow task. One to create the table in excel and one to re - create it. my syntax is as follows:
first Task:
drop table [OpenCalls$]
Second Task:
create table [OpenCalls$]
(
CustomerStoreNumber int,
CustomerOpenedDateTime nchar(16),
CustomerClosedDateTime nchar(16),
HowLong int,
CustomerTicketNumber int,
FSMSNumber varchar(20),
IssueProblemDescription varchar(50),
IssueTrackingDescription varchar(50),
ManufacturerName varchar(20),
UserName varchar(20)
)
When i run these 2 tasks this is what happens:
1. All the Column headers are removed <--- Desired Result.
2. The data gets removed from the sheet <--- Desired Result.
3. The Column headers are re-created <--- Desired Result.
4. The data get re-populated but not in their corresponding row numbers <--- Not a desired result.
My goal is to replace the rows with the new data, but the new data looks like is being appended under empty rows.
I cant think of anything else i can do to fix this. Has anyone of you guys ever run into this issue? Please Help
Thanks in advance.
Start Free Trial