Flat File connection mgr with fixed length and pipe delimited output

  • I'm tring to use SSIS to output a fixed lenght and pipe delimited file. sample below.. It seems the wizard for "Flat File format" is not capable in creating this type of output file. Please any suggestions? There seems there little information on this issue.

    Q1 |Q07|XXXXXXXX|00|XXXX |XXXX |XXXXXXX |San Jose | 0| 0| 7|

    Leonard

  • So which is it Fixed length or pipe delimited? I think the wizard wants you to choose one or the other.

    You could always set it up as fixed length and then add the pipes via your query...

    Something like

    SELECT Col1= + "|", Col2 + "|"

    FROM MyTable

    Just gotta make certain you count your pipes correctly...

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • As Luke said, fixed-width files do not generally have delimiters - they are just wasting space.

    If it's just a pipe-delimited file you need, pipe can be chosen as delimiter if you edit the package (in the task's Advanced Editor, from memory). The output should be the same as that from Luke's query, but easier to maintain.

    If you genuinely need a fixed-width file with pipes between the fields, a version of Luke's query with extra padding spaces, where required to fill out the field to its maximum width, should do the job.


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

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