db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "ListFileNamesOfTables" by KristianWaagan
Date Tue, 15 May 2012 10:00:32 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "ListFileNamesOfTables" page has been changed by KristianWaagan:
http://wiki.apache.org/db-derby/ListFileNamesOfTables?action=diff&rev1=2&rev2=3

  (CONGLOMERATENUMBER)  ||  '.dat'as varchar(12)) as file , isindex
   from SYS.SYSCONGLOMERATES a, SYS.SYSTABLES b
   where a.TABLEID = b.TABLEID AND b.TABLETYPE <> 'S' 
- and isindex = 'false'
  order by file;
  }}}
  
+ This will list all the non-system tables and indexes. If you want to exclude indexes, add
the predicate '' and isindex = 'false' ''.
+ 
+ === Creating the java function 'bigintToHexString' within the database (using an existing
Java API method) ===
+ 
+ In this case we can take advantage of the fact there is already a suitable method in the
Java API:
+ 
+ {{{
+ CREATE FUNCTION bigintToHexString(hexString bigint)
+      RETURNS VARCHAR(16)
+      PARAMETER STYLE JAVA NO SQL
+      LANGUAGE JAVA 
+      EXTERNAL NAME 'java.lang.Long.bigintToHexString';
+ }}}
+ 
+ You're done and can run the query :)
+ 
- === Creating the java function 'bigintToHexString' within the database ===
+ === Creating the java function 'bigintToHexString' within the database (using your own method)
===
  
  1. Create and compile the java method {{{
  // Class supporting Derby Java Stored Procedures and Functions

Mime
View raw message