Skip to Content
avatar image
Former Member

roblem loading dat ainto IQ table

In my file which is a pipe delimited file, I have date column which are in format MM-DD-YYYY.

If in my target table I define the entity as date, the load fails saying that it can not convert MM-DD-YYYY to date, what is the solution to overcome this, please.

Here is my load statement:

LOAD table mytable (

AA'|'

BB '|'

.

XX '|' -> this is columns which in MM-DD-YYYY

,

,

)

USING CLIENT FILE 'd:/IQ_JOBS/data/Areh_kharKossdeh.txt'
QUOTES OFF
ESCAPES OFF
DEFAULTS ON
FORMAT ascii
ON FILE ERROR CONTINUE
SKIP 1
LIMIT 98
;
~

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 07, 2017 at 11:51 PM

    Have you tried putting "date 'mm-dd-yyy' " after the column name? The format must match character for character including the literal '-'.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2017 at 02:37 PM

    I keep my load table statements as simple as possible. Since you're loading via dbisql, you can set the date format via an option:

    set temporary option date_order = 'YMD';
    set temporary option timestamp_format = 'yyyy/mm/dd hh:nn:ss.sss';

    LOAD TABLE ......

    But you asked about DATE (4 BYTE) data type.

    jason

    Add comment
    10|10000 characters needed characters exceeded