Create an SSIS package as shown below:
Step A: Add an SQL task and execute a command "Truncate Table Sales", where Sales is the name of the Excel table.
Step B: Add an SQL task and executye a command to create a table with necessary columns, see example below:
CREATE TABLE Sales(
SalesID NUMBER,
InvoiceNo NUMBER,
SalesAmount NUMBER,
OrderQty NUMBER,
CustomerID NUMBER,
SalesID NUMBER,
InvoiceNo NUMBER,
SalesAmount NUMBER,
OrderQty NUMBER,
CustomerID NUMBER,
SalesDate DATE
)
)
A new table will be created in sheet 'Sales', then create an DFT task to load data into excel sheet Sales.
No comments:
Post a Comment