Results 1 to 6 of 6
  1. #1
    Join Date
    May 2012
    Posts
    155

    Unanswered: coldel, -> why does it work as wanted?

    Hallo everyone,

    I have a normal text-file:

    1,"W","Word","WordText"
    2,"H","Human","HumanText"
    ...
    ...

    I have succeded to load this file in my table. I did this like this:

    db2 "import from myfile.del of del
    modified by coldel,
    insert into mytable"

    The records in mytable are:
    1.Col 2.Col 3.Col 4.Col
    1 W Word WordText
    2 H Human HumanText
    ...
    ...

    This is the result I want, it is correct. But I dont understand why the "..." between the records cleverly disappeard?

    Thank you for the comments.

    Regards,
    Ratna

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by ratnalein View Post
    why the "..." between the records cleverly disappeard?
    Because the double quote is the default character field delimiter. You'll be surprised to see that, even if you omit the coldel modifier, DB2 will cleverly parse the file anyway, because the comma is the default column delimiter.

    Delimited ASCII (DEL) file format - IBM DB2 9.7 for Linux, UNIX, and Windows
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    May 2012
    Posts
    155
    Hallo n_i,

    thanks for the quick answer..

    does it mean that if I do:

    Code:
    modified by nochardel
    then it will be imported with double quote?

    Regards,
    Ratna

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by ratnalein View Post
    does it mean that if I do:

    Code:
    modified by nochardel
    then it will be imported with double quote?
    Would you like me to look it up in the manual for you and post here, or run a test? Or both?
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Quote Originally Posted by ratnalein View Post
    Hallo n_i,

    thanks for the quick answer..

    does it mean that if I do:

    Code:
    modified by nochardel
    then it will be imported with double quote?

    Regards,
    Ratna
    You can try by yourself.

    If the result might be different from your expectation,
    you might want to ask again wih reports of your trials and results(including messages).

  6. #6
    Join Date
    May 2012
    Posts
    155
    the problem is, that I am already at home, no connection to DB2..

Posting Permissions

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