1.) The specified function you give us
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE
(...
does not match the error message
SYSCS_UTIL.SYSCS_IMPORT_DATA
is not recognized as a function or procedure.
2.) The number of values passed does not meet the required.
There is no overloaded function with 8 parameters.
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE
(null,'STAFF','c:\output\myfile.del',';','%',null,0);
1 2 3 4 5 6 7
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE
(null, 'USERS','FIRSTNAME,...,', 'c:\SQL_APP_USERS', '\n',',','UTF-8', 0);
1 2 3 4 5 6 7 8
Also the sequence is wrong .
That would mean that each column is a separate line.
'\n',','
should be
',','\n'
3.) It would be nice if it were that easy.
INSERT INTO ... VALUES (FROM 'c:\SQL_APP_USERS.txt'
So here’s a simple Java Utility class that can be used to load CSV file into Database.
Import CSV into Database example
Tested:
- create a empty file
c:\myfile.del
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE
(null,'CUSTOMER','c:\myfile.del',';','%',null,0);
Here, with table FRIENDS
created for test.
Since file 'c:\myfile.del' is empty, so nothing to do .
NO error : is not recognized as a function or procedure