On 11/30/11 5:46 AM, mane_uk wrote:


    And i have also tried using the IMPORT_DATA instead of IMPORT_TABLE but
then it gives the following error message:

Exception in thread "main" java.sql.SQLException: Import error on line 1 of
file C:\dev\workspace\aaaatest\TRADEMANAGERXLHEAD_TRADELEG.csv: Invalid
character string format for type INTEGER.

    Again, the fields were created based on the content of the cells so it is
correct. And I made sure to change the format of the cell to also correspond
to the content. And, in view of the size of the spreadsheet (42k+ rows and
60+ columns) I can't really go row by row checking all the data.

Hi Emanuel,

You don't need to go through the entire data file. The error message is telling you that the error is on the very first line of the data file. The following script shows that import reports the line number in the data file which is causing the problem:

connect 'jdbc:derby:memory:db;create=true';

create table t1( a int );
create table t2( a varchar( 10 ) );

insert into t2( a ) values ( '1' ), ( '2' ), ( 'horse' ), ( '4' );
call syscs_util.syscs_export_table (null, 'T2', 't2.dat', null, null, null);
truncate table t2;

-- fails on line 3 of the data file
call syscs_util.syscs_import_table(null, 'T1', 't2.dat', null, null, null,0);

Hope this helps,
-Rick

Reply via email to