0

I have flat txt file 700b long that holds 100+ fields and I need to load it into db, I already have all positions for each field, can I somehow to use this substring mapping in load step? For now I just lad all into single column and then run SQL script to substring all fields into my table. ? Also I need to skip first and last rows, no problem with first one, done on Connector, but do we have any easy option to skip last one (footer). Appreciate you info, I read about dynamic mapping but looks like its only for data types ? Best M

Mike S
  • 296
  • 2
  • 14
  • SSIS can load column delimited flat files. However, if your files are delimited by their Column position (like EBCDIC files) then you will need to first parse the files to convert it to a delimited file. – J Weezy Dec 03 '18 at 22:39
  • Tx, JW! Yes I have this 2 step solution, but curious if I can load flat into db in single step by position. – Mike S Dec 03 '18 at 23:08
  • 1
    Are you asking how to import a fixed width file? Here's one guide. https://stackoverflow.com/questions/10289640/how-to-import-a-fixed-width-flat-file-into-database-using-ssis If you are asking something else please clarify. In my experience its easier and faster to stick with what you have - load into a single column and split. If you move that split logic out to a driver, you are stuck with any bugs in the driver. And there are a lot of bugs in file drivers. – Nick.Mc Dec 04 '18 at 00:44
  • @Nick.McDermaid I forgot about the fixed width format in the selector. Yes, I once had a file that was ragged right that I had the pleasure of loading. Thanks for bringing this up. You should post this as the answer (or one of potentially many answers at least). – J Weezy Dec 04 '18 at 15:43

0 Answers0