Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    80

    Unanswered: Re-arrange the columns

    Hi - can any one let me know how to re-arrange the columns of a comma seperated file. The problem here is that the colums some times have new lines and when the columns has new lines or extra comma's then it is enclosed in double quotes("). Can any one tell me how to re-arrange the columns now.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2004
    Location
    Rome, Italy
    Posts
    81
    Sorry, but I don't understand what do you mean with "re-arrange columns". Can you give an example with what you have as intput and what do you expect for output?

    bye

  3. #3
    Join Date
    Jan 2005
    Posts
    80
    yes, here is the example row.

    current row:

    1,2,3,"x,x,x", "y
    y
    Y", 6,7,8

    expected output:

    8,7,6,"y
    y
    Y","x,x,x",3,2,1

    there are 8 columsn. that means the order of the column is changed and the field with y's are spread in 3 lines and the field with x's has more comma's

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •