I should have been more clear in my first post, in regards to two specific examples on this page:
http://db.apache.org/derby/docs/dev/tools/rtoolsdblookexamples.html These two examples should be removed from the documentation because they do not work (at least in the way I tried them): Dump the DDL for all objects with schema 'SAMP' in database 'sample' that are related to the table name 'My Table' to the console. java org.apache.derby.tools.dblook -d jdbc:derby:sample -z samp -t "My Table" Dump the DDL for all objects in database 'sample' that are related to either of the table names 'STAFF' or 'My Table' to the console. java org.apache.derby.tools.dblook -d jdbc:derby:sample -t "My Table" staff ij version 10.2 ij> connect 'jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2-bin\dem o\databases\toursDB'; ij> create table "My Table"(id integer); 0 rows inserted/updated/deleted ij> disconnect; ij> exit; C:\derby_src\db-derby-10.2.1.2-bin\demo\databases>java -jar C:\derby_src\db-derb y-10.2.1.2-bin\lib\derbyrun.jar dblook -d jdbc:derby://localhost:1527/C:\derby_s rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t "My Table" -- Timestamp: 2006-09-06 12:56:22.109 -- Source database is: C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB -- Connection URL is: jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 -bin\demo\databases\toursDB -- The dblook utility will consider only specified tables. -- Specified schema is: APP -- appendLogs: false C:\derby_src\db-derby-10.2.1.2-bin\demo\databases>java -jar C:\derby_src\db-derb y-10.2.1.2-bin\lib\derbyrun.jar dblook -d jdbc:derby://localhost:1527/C:\derby_s rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t "My Table" airlines -- Timestamp: 2006-09-06 14:00:16.713 -- Source database is: C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB -- Connection URL is: jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 -bin\demo\databases\toursDB -- The dblook utility will consider only specified tables. -- Specified schema is: APP -- appendLogs: false -- ---------------------------------------------- -- DDL Statements for tables -- ---------------------------------------------- CREATE TABLE "APP"."AIRLINES" ("AIRLINE" CHAR(2) NOT NULL, "AIRLINE_FULL" VARCHA R(24), "BASIC_RATE" DOUBLE, "DISTANCE_DISCOUNT" DOUBLE, "BUSINESS_LEVEL_FACTOR" DOUBLE, "FIRSTCLASS_LEVEL_FACTOR" DOUBLE, "ECONOMY_SEATS" INTEGER, "BUSINESS_SEA TS" INTEGER, "FIRSTCLASS_SEATS" INTEGER); -- ---------------------------------------------- -- DDL Statements for keys -- ---------------------------------------------- -- primary/unique ALTER TABLE "APP"."AIRLINES" ADD CONSTRAINT "AIRLINES_PK" PRIMARY KEY ("AIRLINE" ); Susan --- Susan Cline <[EMAIL PROTECTED]> wrote: > Date: Wed, 6 Sep 2006 12:28:41 -0700 (PDT) > From: Susan Cline <[EMAIL PROTECTED]> > Subject: dblook and lower-case table names created with double-quotes, doc > bug or "bug" bug? > To: [email protected] > > In reviewing the dblook examples in the Tools and Utilities Guide: > > http://db.apache.org/derby/docs/dev/tools/rtoolsdblookexamples.html > > I noticed the output from using the -t flag with dblook to specify a > particular table created > using > lower case names and double-quotes is inconsistent when creating tablenames > in upper case and > double-quoting the name. > > Testing these combinations, case 3 and 5 do not work as expected. > > Create tables in lower and upper case, some with one word, and quoted, some > with multiple words: > > 1) create table lower_case_one_word(id integer); > > 2) create table UPPER_CASE_ONE_WORD(id integer); > > 3) create table "lower_case_quoted_word"(id integer); > > 4) create table "UPPER_CASE_QUOTED_WORD"(id integer); > > 5) create table "lower_case quoted three_words"(id integer); > > 6) create table "UPPER_CASE QUOTED THREE_WORDS"(id integer); > > I tested using dblook directly, org.apache.derby.tools.dblook and > derbyrun.jar, with the same > results. > Use the -t argument for dblook: > > 3) create table "lower_case_quoted_word"(id integer); > This does not work if it is passed if lower case, upper case or double quotes > or not are used: > > java -jar C:\derby_src\db-derby-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t > lower_case_quoted_word > -- Timestamp: 2006-09-06 11:01:30.9 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > > java -jar C:\derby_src\db-derb-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t > "lower_case_quoted_word" > -- Timestamp: 2006-09-06 11:03:32.585 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > java -jar C:\derby_src\db-derby-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t > "LOWER_CASE_QUOTED_WORD" > -- Timestamp: 2006-09-06 12:17:43.425 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > java -jar C:\derby_src\db-derby-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t > LOWER_CASE_QUOTED_WORD > -- Timestamp: 2006-09-06 12:18:00.49 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > > 5) create table "lower_case quoted three_words"(id integer); > This does not work whether the argument is in lower case or upper case and > double quoted: > > java -jar C:\derby_src\db-derby-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t "lower_case quoted > three_words" > -- Timestamp: 2006-09-06 11:09:11.352 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > java -jar C:\derby_src\db-derby-10.2.1.2-bin\lib\derbyrun.jar dblook -d > jdbc:derby://localhost:1527/C:\derby_s > rc\db-derby-10.2.1.2-bin\demo\databases\toursDB -z APP -t "LOWER_CASE QUOTED > THREE_WORDS" > -- Timestamp: 2006-09-06 12:20:42.553 > -- Source database is: > C:\derby_src\db-derby-10.2.1.2-bin\demo\databases\toursDB > -- Connection URL is: > jdbc:derby://localhost:1527/C:\derby_src\db-derby-10.2.1.2 > -bin\demo\databases\toursDB > -- The dblook utility will consider only specified tables. > -- Specified schema is: APP > -- appendLogs: false > > Is this a doc bug or a bug in the code? > > Thanks, > > Susan >
