db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Error running call syscs util command
Date Wed, 30 Nov 2011 13:41:36 GMT
On 11/30/11 1:58 AM, Emanuel Chiavegato wrote:
> Hi Rick,
>     Thanks for your reply.
>     Yes, the problem was related to have the table name in uppercase. Once i fixed it
another error came out and i was hoping you could help. The error mesage is extremely long
but starts like: Column 'column21' is either not in any table in the from list or appears...
>     I googles it and it seems the problem is related to not have enough columns in the
table but all the columns that i have in my csv file has a correspondent column in my table.
I have also tried with my xls file just in case but i encountered the same error message.
>     Any ideas?
> Many thanks
> Emanuel
> Sent from my iPhone
Hi Emanuel,

I think that Knut answered your question on another email thread. The 
import procedure works if the table has fewer columns than the data file 
but fails with a wordy message if the table has more columns than the 
data file. The following script shows this behavior:

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

create table t1( a int );
create table t2( a int, b int );
create table t3( a int, b int, c int );

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

-- too few columns in the table, but works
call syscs_util.syscs_import_table(null, 'T1', 't2.dat', null, null, 

-- works
call syscs_util.syscs_import_table(null, 'T2', 't2.dat', null, null, 

-- too many columns in the table and raises an error
call syscs_util.syscs_import_table(null, 'T3', 't2.dat', null, null, 

select * from t1;
select * from t2;
select * from t3;

Hope this helps,

View raw message