Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to create an SSIS package to automate the migration of data from a .csv file format to the SQL Server. But my .csv file contains a lot of information ( initial status information about wireless sensors ) before the data in the tables that I actually need to work with. Since the entire process has to be automated, I am wondering if there is any way I could bypass/ignore the useless information and directly get to the data in the .csv file. So that I don't need to manually take off the information and create a new .csv file each time and then create a new SSIS package for it.
Posted

Set up a stored procedure that takes in all data then only saves to the final table the records you want.

A better way would be to use a .NET interface to automate the trim.
 
Share this answer
 
v2
Hi,

You could use OPENROWSET[^] in the SSIS package to read the data from the file. If the amount of non-interesting rows is known you can define how many rows are skipped in the beginning. The same can be done using bcp[^] if that's more suitable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900