Parsing A Merged Text File Into Respective table text files

  • hi,

    I have a text file that have multiple tables merged into it. These files are to be parsed and needs to be created as a seperate text files, on the basis of 1st column. What component will get this done ? I have read some blogs and newsgroups and some people says that "Script Component" is that i seek, but I tried it and could not get it running ...

    I am really new to this SSIS thingee ... any help will be very appriciated.

    FP


    FP

    True Love is Like A Ghost. Everyone Talks About It & Nobody have seen it.

  • While you could use a script component, I would say it's a bit of overkill for you.

    You could use a flat file source, specify ragged right and create two columns. Your first is the indicator, second is everything else.

    You then use a conditional split and split off the different types. Below each output of the CS, you can use a derived column to hack apart the other column into separate columns.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Thanks for the help. To give you a clearer picture ... here is a sample file data. In the below the 1st line is the header for the consolidated file. the first field tells which database this belongs to. Second one tells which table and 3rd ones dictates if its a new / update request. Schema are different for each table. Now are there any new advise in line of this information ?

    ABFCDR 19800615 11:07:09 861188809

    ABFPPIUPD74165614INabcxyz000-00-0010001F18601019MCCEL19800015064019800015

    ABFPPIUPD74664533INpaFha,farrukh000-88-5818508F19410409MEREM198003091908

    ABFPMIUPD74165614N18FHKH174.4174.40571000

    ABFPMIUPD74664533Y47RHUF800.01800.010100909

    ABFPMIINF75007849N47MOHF414.03V81.04701001

    ABFPMIUPD75045971YIFLAMTCHA789.06574.10574.000070908

    ABFPDIUPD74165614198000171757FHA/FUR

    ABFPDIUPD74664533198003170058FHORTHO

    ABFPDIINF75007849198004061830FHA/MED

    ABFPDIUPD75045971198004041609FHA/FUR

    ABFPCIUPD74664533164038.48

    ABFPCIINF7500784943800.70

    ABFPCIUPD75045971131004.90

    ABFPCIUPD7596040740181.33

    ABFPTFUPD7416561419800015A/FUR17001980

    ABFPTFUPD7466453319800309ORTHO17031980

    ABFPTFUPD7500784919800405A/MED06041980

    ABFPTFINF7504597119800309A/FUR04041980

    ABFPTFUPD7596040719800514A/FUR16051980

    ABFPTFUPD7600775619800516A/FUR16051980

    ABFPTFINF7606040119800614P/MED14061980

    ABFPTFINF7630086819800614EYE FURG14061980


    FP

    True Love is Like A Ghost. Everyone Talks About It & Nobody have seen it.

  • The same still applies barring the fact that you might as well setup your text file source to parse the first 3 columns and use a ragged right for the rest. Everything else is still the same theory.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply