Hi Mark,
Thanks for the reply. I did see the BCP format in the LOAD documentation but I couldn't figure out what it means. This explains it!
However what I run the code that you give, I get the following error instead. I guessed that it's a delimiter problem... I checked in a hex editor and I see:
Delimiter is 0x2c which is what's in the file (comma)
Row Delimiter is 0x0d 0x0a which is CRLF
So... I changed the delimiter and it worked. Yay!
On a side-note I've used these same files to load into 10 different databases and only IQ was this hard - normally I'm up and running within 5-10 minutes. Think it's a combination of weird terminology, weird syntax and lack of action on forums with people discussing this stuff. It's a shame because IQ seems like a pretty interesting database.
Thanks again!
set temporary option escape_character='on';
set temporary option quoted_identifier='on';
set temporary option date_format='ymd'; -- forces the date order to be YMD for loading
LOAD TABLE transaction
( customer_id, merchant_id, txtimestamp, txamount, txcurr)
FROM '/iq/demo/1.csv'
FORMAT BCP
ESCAPES OFF
DELIMITED BY ','
ROW DELIMITED BY '\x0d\x0a';
John
server:/iq/iq/IQ-16_0/demo # dbisql -c "uid=DBA;pwd=sql" loadnew.sql
Could not execute statement.
Right truncation of string data
SQLCODE=-638, ODBC 3 State="22001"
File: "loadnew.sql" on line 1, column 1
LOAD TABLE transaction
( customer_id, merchant_id, txtimestamp, txamount, txcurr)
FROM
'/iq/transaction_2001.csv',
'/iq/transaction_2002.csv',
...
You can continue executing or stop.
1. Stop
2. Continue
John