locked
Extra spaces while importing data from dat file to table RRS feed

  • Question

  • Hi,

    I am using sql server 2008 and I need to import a dat file to table using ssis. I have created the package such that we have a fixed width to each of the column.

    Say

    col1 - 5

    col2 - 20

    col3 - 8

    ...

    The sample file to be imported has data like

    224  NORTH JERSEY NJ            
    224  NORTH JERSEY NJ            
    224  NORTH JERSEY NJ      222222
    224  NORTH JERSEY NJ      222222
    224  NORTH JERSEY NJ                       

    But the preview shows with extra spaces.. Any thing needs to be done?

    Please let me know how to correct this..


    Please mark as helpful and propose as answer if you find this as correct!!! Thanks, Rakesh.

    Monday, February 4, 2013 7:02 AM

Answers

  • I got the answer myself,

    added a new column

    col 4 - 2

    This is the row delimiter column..

    Thanks


    Please mark as helpful and propose as answer if you find this as correct!!! Thanks, Rakesh.

    • Marked as answer by Eileen Zhao Thursday, February 7, 2013 12:52 PM
    Monday, February 4, 2013 7:59 AM