If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Loading a null in a date value

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-14-07, 11:23
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
Loading a null in a date value

Hi All,

I need some help.
Details are

DB2 V 8.1
OS Aix
Issue - Load Utility.

Load command -
LOAD CLIENT FROM "C:\sim001tbload.csv" OF DEL MODIFIED BY DATEFORMAT="YYYY.MM.DD" METHOD P (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49) MESSAGES "C:\sim1" INSERT INTO MAKERN.SIM001TB (POLNO, AREABCH, LOCALBCH, BRDCLSS2, SBBRDCLS, AGYCODE, POLCLSS, INCDATCP, RNLEXDTC, RNLEXMTH, CANCDTCP, POLPER, CANCID, POLHOLID, POSTCODO, POSTCODI, MPPINDIC, REINSID, COINSID, SCHMCODE, SCHMDISP, ISDCTLID, METHCOL, PINTBON, BCHSECID, MINPREM, POLANPRM, WPYTDC, WPYTD1, WPYR1, COMMYTDC, COMMYTD1, COMMYR1, BLDGSFLG, CNTSFLAG, ALLRSKFG, LRNLDTCP, LRNLMTH, NUMPOLS, CASEID, TBYBKIND, EDI, BROKER, REGION, POLTYPE, CURRPROD, PREVPROD, MIGPFLAG, MIGDATCP) COPY NO INDEXING MODE AUTOSELECT;


Input file -CSV1 This is successfull as we have a date value at the end. i.e field 49.

Input file csv2. This fails becase the date value is null.

ERROR -
SQL3114W Some data following """" in row "F0-1" and column "49" was not
loaded.

SQL3191N The field in row "F0-1", column "49" which begins with """" does not
match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT. The row
will be rejected.


Please can anyone advise the changes to the load command or a better way of doing with.

Thanks

Nitin.
Attached Files
File Type: txt csv1.txt (395 Bytes, 39 views)
File Type: txt csv2.txt (387 Bytes, 33 views)
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
  #2 (permalink)  
Old 02-14-07, 15:00
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Dump exceptions into a file ("..modified by dumpfile=...") and then load the dumped records with a different LOAD command.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On