I have a package which bulk loads data from a 40 field delimited flat file into Sql Server. I am now running into a complication, where some of the files are comma delimited and some are tilda (~) delimted. Some of the files include column names on the first line and some do not.
I need some way of determining these properties at run time.
What I would think would work is, at run time to read the first line and count the amount of tilda's found. If the amount > x then set the file delimiter to tilda otherwise to comma. I would also like to read the first word of the file to determine if there are column headers in the file.
I believe that this can be accomplished with some script. Is this so? If yes, how can this be done and do the scripts need to be written with VBS or can I use C#?
Is there a better and easier alternative to accomplishing this task?