SSIS export to Tab Delimited Text file

  • Hello,

    I was asked to make an SSIS package that extracts Supplier data from the source db and export the data to a Tab Delimited Text File.

    When I open the Text File the values of the different columns don't neatly organize under the column names.

    Is it possible to make a Tab Delimited Flat File export in which the values of the export organize neatly under the column headers of the text file?

    Thx in advance!

  • What you're describing you want to see sounds more like a fixed width file rather than a tab delimited file.

    The purpose of delimited files is that you only need to take up the amount of data required to hold the value in your column, this means that unless every column happens to be made up of the same data size, they won't line up neatly. You can then use another facility such as excel to view the data, or import it into a table using the delimiter as the column seperator.

    Follow me on twitter @EvoDBACheck out my blog Natural Selection DBA[/url]

  • I guess the outlining is not correct in your view due to a (very) different length of the data in each row. In most text editors tab-stops are pre-defined. When data is longer, it will go to a later tabstop instead of shorter data. See below sample (multiple dots represent one TAB):

    pre-definde stab-stops:[font="Courier New"]

    .........|.........|.........|.........|

    row1_column_1.......row1_column_2

    row2_longerdata_column_1......row2_column_2

    row3_column_1.......row3_column_2

    row4_column_1.......row4_column_2

    [/font]

    Dispite the allignment in the editor/view the data is correct tab-seperated. Between each column is one tabstop defined. You can verify this by importing the flat file in Excel or some other program.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Thanks for your replies.

    Indeed when I copy the export to Excel it identifies the right values with the right column names. If I want a neat organization of my columns and values I should use fixed column widths instead of tab delimited.

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

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