how to read flatfile having header,data,footer without delimeters to 3tables(header table,data table,footer table)
hi experts, my input flatfile like this AHACCVQVF730038420111122093002LIVE (header with 8columns) AV00001632005000915425066717911010380088B B Phala (data with 8columns) AV00002470010000126028318416601165094086T Moodley AV00003051001000041458165217004025027082M M STANDER AV00004470010000124956418016108140730081ML ML Mopeli AT0000112 (footer with 3cols) how this flatfile read into 3 individual tables. please provide me a solution thanks in advance
December 15th, 2011 1:43am

if the question is not clear plz ask me
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2011 2:00am

Hi, You want to load this flat file into 3 different table based on some logic and hopping this file is Fixed with file. i would suggest to use script component for transformation activity in data flow task and write your logic to identify the row for their respective table and update the variable value. and then use conditional split on that variable to divert the row to respective destination table. -Regards MukeshMukesh
December 15th, 2011 2:44am

dear mukesh thank for your response Actually i am not good in scripting. can you give some example for the above requirment Actually i am referring this link (http://rad.pasfu.com/index.php?/archives/38-Script-Component-as-Source-SSIS.html) but in this link having delimeters for the data but my requirement is something different can you suggest me any modifications to above link thank you
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2011 3:01am

Hi One straight forward method would be to stage the flatfile as-is into a database table. Then use a cursor to shred each row and process however you need to. Regards, Jason MCITP BI Developer - MCTS SQL Server (http://bichopsuey.wordpress.com/)
December 15th, 2011 3:08am

Hi, I saw your link but i would recommend to use transformation for script component type instead of source which you can see in your reference link. then follow following steps 1. declare a variable and pass it to script compoent 2. access the current row using Raw variable and put your logic 3. update the variable with repect to defferent tables 4. use conditional split to redirect the row to the respective tables destination. you should use three destination, one for each table. reference link:- http://msdn.microsoft.com/en-us/library/ms136114.aspx Mukesh
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2011 5:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics