• rocky_498 (10/29/2013)


    Hi Guys,

    Need help.. Here is my sample data

    LAT|BOX|5290113661|BP9744524|PHY|JAI|GREWAL|1|BI|Vacc Bill|MED|191.2||SHI||20131015|50242006001|||||6|116820411||

    LAT|BARDI|TAMMY|20020 44th|PHY|MARK|MORADI|BI|Vacc Bill|MED|183.0||SHI||20131016|50242006001|||||6|116899590||

    LAT|ARRE|SONIA|344 RICH|PHY|IAN|HANT|1|BI|Vacc Bill|MED|153||SHI||20131016|50242006|||||3|116786607|

    AND I want to be my out put in Flat file like this.

    LAT|BOX|5290113661|BP9744524|

    PHY|JAI|GREWAL|1|

    BI|Vaccine Bill|

    MED|191.2||

    SHI||20131015|50242006001|||||6|116820411||

    LAT|BARDI|TAMMY|20020 44th Ave|

    PHY|MARK|MORADI|

    BI|Vaccine Bill|

    MED|183.0||

    SHI||20131016|50242006001|||||6|116899590||

    LAT|ARRE|SONIA|344 RICHBELL RD|

    PHY|IAN|HANTMAN|1|

    BI|Vaccine Bill|

    MED|153.8||

    SHI||20131016|50242006|||||3|116786607|

    I am using SSIS. Please any advise would be great appreciate...

    Thank You.

    Your "sample data" and your desired output don't make any sense. It seems that your output has lots of information that isn't in your input. It breaks at random places. You are going to need to provide a lot more detailed information if you want help with this.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/