Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253

    Unanswered: Question on LOAD

    I'm trying to load a text file into a DB2 table. There are four columns: two character columns and two DATE columns. I'm encountering issues with the date columns asnd data.

    The inout file's date format is mmddyy. When I try to import the column I get the following error:

    "C:\Documents and Settings\amrobi2\Desktop\A180206D.txt" OF ASC MODIFIED BY CODEPAGE=1252 DATEFORMAT="MM.DD.YYYY" NULLINDCHAR=Y METHOD L (7 16,17 26, 1 6,45 51) NULL INDICATORS (0, 0, 0, 0) MESSAGES "lllll" REPLACE INTO AMROBI2.CROSSREFERENCE (ELECDATE, ELECSEQ, PAPERDATE, PAPERSEQ) COPY NO INDEXING MODE DEFERRED

    SQL3405N The beginning-ending location pair for inserting into column "3" is
    not valid for a date.

    What options would I / could I utilize in order to get this stuff in there?
    T
    Thanks!
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I think MODIFIED BY DATEFORMAT should help

    Refer LOAD command documentation

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    I've consulted the LOAD reference and still having issues loading the date data. Here's the script portion:

    LOAD FROM "C:\Documents and Settings\amrobi2\Desktop\A180206P.txt" OF ASC MODIFIED BY CODEPAGE=1252 DATEFORMAT="MM.DD.YYYY" NULLINDCHAR=Y METHOD L (1 6, 7 16, 17 26, 27 32) NULL INDICATORS (0, 0, 0, 0) MESSAGES "gggg" REPLACE INTO AMROBI2.CROSSREFERENCE (ELECDATE, ELECSEQ, PAPERSEQ, PAPERDATE) COPY NO INDEXING MODE AUTOSELECT;
    CONNECT RESET;


    The input format is MMDDYY. If I try to modify the script to say DATEFORMAT="mmddyy", the LOAD throws an error saying the date format is incorrect.

    Anyone have an idea...
    Last edited by ansonee; 06-28-04 at 02:13.
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

Posting Permissions

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