string of data into columns

  • I have a txt file that has about 5 columns when i import it.  1 of the column imports the data incorrectly and puts 15 columns into 1.  It is all separated by tabs in that one column.  How can i copy the values into their own columns.  I created empty varchar(50) columns with generic names like col1, col2, col3, col4, etc... The data looks like this:

    V144619.41463N APMATCH01-JAN-18 04.19.18.713525000 AM03-JAN-18 02.37.18.713525000 AM01-JAN-18 04.19.18.713525000 AMD YYYYY0D   VPDDNN0000D  VN  DD00  D    DD0
  • I don't understand. The string you provided has over 50 tabs in it. But you say it's tab separated and putting 15 columns into 1 and has 4 other columns.

    What is the input data and what is the output you expect?

     

  • GrassHopper wrote:

    I have a txt file that has about 5 columns when i import it.  1 of the column imports the data incorrectly and puts 15 columns into 1.  It is all separated by tabs in that one column.  How can i copy the values into their own columns.  I created empty varchar(50) columns with generic names like col1, col2, col3, col4, etc... The data looks like this:

    V144619.41463N APMATCH01-JAN-18 04.19.18.713525000 AM03-JAN-18 02.37.18.713525000 AM01-JAN-18 04.19.18.713525000 AMD YYYYY0D   VPDDNN0000D  VN  DD00  D    DD0

    You've given us virtually no information to help you.  We need some info...

    What are you using to do the import and how are you using that to do the import?

    What are you using for delimiters? I know tabs are involved but...

    Are the delimiters for the 5 columns different than the others?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This was removed by the editor as SPAM

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

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