db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: systemtables
Date Tue, 04 Dec 2007 17:37:22 GMT
Thomas Vatter <thomas_vatter@web.de> writes:

> Hi there,
>
> I am trying to make a selection from the systemtables and running into
> an error message. The select string is
>    select * from SYS.systables t where t.tablename = 'mytable'
>
> (The table 'mytable' really is existing in systables.tablename.)
> The error message is
>   Comparisons between 'VARCHAR' and 'CHAR' are not supported.
>
> What am I doing wrong?

Beats me. This works for me in 10.3.2.1:

ij> create table mytable(i int, j varchar(32));
0 rows inserted/updated/deleted
ij> select * from SYS.systables t where t.tablename = 'mytable';
TABLEID                             |TABLENAME                                           
                                                                           |&|SCHEMAID
                           |&
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

0 rows selected

As expected. (Derby stores table names as upper case)

ij> select * from SYS.systables t where t.tablename = 'MYTABLE';
TABLEID                             |TABLENAME                                           
                                                                           |&|SCHEMAID
                           |&
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
72e9c096-0116-a634-9b28-000003b63150|MYTABLE                                             
                                                                           |T|80000000-00d2-b38f-4cda-000a0a412c00|R

1 row selected


Which version of Derby are you using?

-- 
dt

Mime
View raw message