As per the documentation, you need to use the EXPRESSION
keyword to show that the value is coming purely from the specified expression and is not dependent on anything in the data file:
OPTIONS (SKIP=1)
LOAD DATA
INFILE '/home/gxs/segmentation/sqlloader/datos.csv'
APPEND INTO TABLE test
(id EXPRESSION "s_test.nextval",
name char(10) TERMINATED BY ',' ,
tel char(20) TERMINATED BY ',' ,
apellido char(10) TERMINATED BY ',' )
... which inserts:
ID NAME TEL APELLIDO
---------- ---------- ---------- ----------
1 daniel 12345 buitrago
2 cesar 98765 san
3 alex 4556 ova
At the moment it's assuming ID
is a field in your data file, and since you haven't specified a data type it's defaulting to char
with size 1
, which is consuming the first character of your real first field.