I have a table with ZIP files saved as RawData. I’ve extracted the ZIP files using BCP, then unzipped them using 7-zip. The Unzipped files are RTF files that are given the ID number for the name. For example 56.rtf, 65.rtf, etc. My question is how do I import the raw RTF data into a row in a table based on the file name? I’ve been playing with BULK INSERT and that gets the data into a table with one column, but how do I know which row in the table corresponds to which file so it can be retrieved with a query? I’m fairly new at this so try to keep it as simple as possible.
Share
I would use SSIS for this task. If you create a data flow inside a for each file loop, then you can loop over all the files in a folder and capture the file name of each file in a SSIS variable, and then insert this into a second column. Your package st,rupture would be as follows:
MyPackage
MyForEachLoop
MyDataFlowTask
MyFlatFileSource
MyOLEDBDestination