Skip to Content
0

roblem loading dat ainto IQ table

Jul 07, 2017 at 02:16 PM

83

avatar image
Former Member

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
;
~

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 20, 2017 at 02:37 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded