You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Emanuel Chiavegato <em...@gmail.com> on 2011/11/30 10:58:33 UTC

Error running call syscs util command

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

Re: Error running call syscs util command

Posted by Rick Hillegas <ri...@oracle.com>.
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, 
null,0);

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

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

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

Hope this helps,
-Rick