May 13, 2009 at 1:22 pm
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
May 13, 2009 at 2:19 pm
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.
May 13, 2009 at 10:28 pm
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy