Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Posts
    144

    Exclamation Unanswered: Please help me with the LOAD utility

    Hello!

    I wish to use the LOAD utility to insert data into a table from a comma delimited file. In order to do so, I would like to ask you some questions regarding this utility:

    1) How do I represent the NULL values in this Comma Delimited File?

    2) I used a command like
    db2 Load from MyTable.txt of del modified by timestampformat="YYYY/MM/DD HH:MMS" insert into MyTable

    and it raises the following error:
    SQL3192N In the filetmod a user specified with the string "YYYY/MM/DD" is not valid.

    I tried using "YYYY/MM/DD HH:MMS.UUUUUU" (which is an example in the command reference) and the error persists. What is wrong?

    I will appreciate any advice you could give me about using the LOAD utility.

    Thank you very much.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Please help me with the LOAD utility

    1) No values between comma is taken as null,

    for eg: 1,,5, loads a null value in the second field ...

    2) Check
    http://dbforums.com/showthread.php?threadid=478251


    Cheers

    Sathyaram

    Originally posted by EMoscosoCam
    Hello!

    I wish to use the LOAD utility to insert data into a table from a comma delimited file. In order to do so, I would like to ask you some questions regarding this utility:

    1) How do I represent the NULL values in this Comma Delimited File?

    2) I used a command like
    db2 Load from MyTable.txt of del modified by timestampformat="YYYY/MM/DD HH:MMS" insert into MyTable

    and it raises the following error:
    SQL3192N In the filetmod a user specified with the string "YYYY/MM/DD" is not valid.

    I tried using "YYYY/MM/DD HH:MMS.UUUUUU" (which is an example in the command reference) and the error persists. What is wrong?

    I will appreciate any advice you could give me about using the LOAD utility.

    Thank you very much.

  3. #3
    Join Date
    Mar 2003
    Posts
    144

    Smile

    Thanks a lot.

    I have other question:

    -How I must handle singles quotes (') inside character data?

    Thank you very much.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    What is you coldel value? If it is the default " then I think it may not be a problem to have a single quote as a part of the data ...

    Look out for the title Delimiter Restrictions description in the Data Movement Guide ...

    Cheers

    Sathyaram

  5. #5
    Join Date
    Mar 2003
    Posts
    144

    Cool

    Thanks for your answer.

    I am using ',' as the column delimiter. I thought that single quotes inside character data might be a problem, because at that moment I believed that character data must be enclosed with singles quotes.

    Now I know that character data must be enclosed with double quotes (") and that double quotes inside character data must be replaced with 2 double quotes characters.

    As I stated in another topic, I still not know how to deal with non-printable characters inside character data.

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I meant chardel in my previous post ...

    Anyway, good that you know the solution


    Cheers


    Sathyaram

    Originally posted by EMoscosoCam
    Thanks for your answer.

    I am using ',' as the column delimiter. I thought that single quotes inside character data might be a problem, because at that moment I believed that character data must be enclosed with singles quotes.

    Now I know that character data must be enclosed with double quotes (") and that double quotes inside character data must be replaced with 2 double quotes characters.

    As I stated in another topic, I still not know how to deal with non-printable characters inside character data.

Posting Permissions

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