Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Derby territory based databases
Derby territory based databases [message #591422] Sat, 14 June 2008 15:30
Stephan van Loendersloot is currently offline Stephan van LoenderslootFriend
Messages: 7
Registered: July 2009
Junior Member
Hi,

I'm trying to use the latest RC3 packages with Derby databases that use
territory-based collation, but no database properties in any schema
(tables, stored procedures etc.) are viewable.

This used to be a known problem with the Derby-tools itself. The error
message that Derby returns is the following:

---

Failed Statement is: SELECT TABLENAME AS TABLE_NAME, TABLETYPE AS
TABLE_TYPE FROM SYS.SYSTABLES A,SYS.SYSSCHEMAS B WHERE
A.SCHEMAID=B.SCHEMAID AND B.SCHEMANAME='AZLOGISTICS' AND ( TABLETYPE='A'
OR TABLETYPE='T' OR TABLETYPE='S' OR TABLETYPE='V' )

ERROR 42818: Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR
(TERRITORY_BASED)' are not supported. Types must be comparable. String
types must also have matching collation. If collation does not match, a
possible solution is to cast operands to force them to the default
collation (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename
AS VARCHAR(128)) = 'T1')

/---

This information is somewhat misleading. For regular comparisons, the
workaround suggested in the error message does apply, but for retrieving
database schema information, the workaround is as simple as executing a
'SET SCHEMA SYS;' statement on the connection before the 'SELECT
TABLENAME....'

This generally accounts for retrieving any database schema information.

For related information, please see the following URL:

https://issues.apache.org/jira/browse/DERBY-3458

I made a custom fix for this when using previous versions of DTP, but
that build process is so cumbersome, that I would be very pleased to see
this getting fixed before Ganymede gets released.


Regards,

Stephan van Loendersloot.
Previous Topic:Stored Procedure and User-Define Functions
Next Topic:Execute SQL in the run toolbar button?
Goto Forum:
  


Current Time: Fri Apr 26 08:29:32 GMT 2024

Powered by FUDForum. Page generated in 0.02291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top