Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 297E1CF08 for ; Tue, 15 May 2012 10:00:58 +0000 (UTC) Received: (qmail 93891 invoked by uid 500); 15 May 2012 10:00:58 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 93802 invoked by uid 500); 15 May 2012 10:00:57 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 93779 invoked by uid 99); 15 May 2012 10:00:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2012 10:00:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2012 10:00:54 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 0EA431AF for ; Tue, 15 May 2012 10:00:33 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Tue, 15 May 2012 10:00:32 -0000 Message-ID: <20120515100032.67978.79749@eos.apache.org> Subject: =?utf-8?q?=5BDb-derby_Wiki=5D_Update_of_=22ListFileNamesOfTables=22_by_Kr?= =?utf-8?q?istianWaagan?= Auto-Submitted: auto-generated 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=3Ddiff&rev1=3D= 2&rev2=3D3 (CONGLOMERATENUMBER) || '.dat'as varchar(12)) as file , isindex from SYS.SYSCONGLOMERATES a, SYS.SYSTABLES b where a.TABLEID =3D b.TABLEID AND b.TABLETYPE <> 'S' = - and isindex =3D 'false' order by file; }}} = + This will list all the non-system tables and indexes. If you want to excl= ude indexes, add the predicate '' and isindex =3D 'false' ''. + = + =3D=3D=3D Creating the java function 'bigintToHexString' within the datab= ase (using an existing Java API method) =3D=3D=3D + = + In this case we can take advantage of the fact there is already a suitabl= e 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 :) + = - =3D=3D=3D Creating the java function 'bigintToHexString' within the datab= ase =3D=3D=3D + =3D=3D=3D Creating the java function 'bigintToHexString' within the datab= ase (using your own method) =3D=3D=3D = 1. Create and compile the java method {{{ // Class supporting Derby Java Stored Procedures and Functions