From derby-user-return-5149-apmail-db-derby-user-archive=db.apache.org@db.apache.org Thu Sep 14 22:29:34 2006 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 36816 invoked from network); 14 Sep 2006 22:29:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 22:29:34 -0000 Received: (qmail 95403 invoked by uid 500); 14 Sep 2006 22:29:32 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 95384 invoked by uid 500); 14 Sep 2006 22:29:32 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 95373 invoked by uid 99); 14 Sep 2006 22:29:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [212.27.42.27] (HELO smtp1-g19.free.fr) (212.27.42.27) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 15:29:32 -0700 Received: from alo72-1-88-163-212-43.fbx.proxad.net (alo72-1-88-163-212-43.fbx.proxad.net [88.163.212.43]) by smtp1-g19.free.fr (Postfix) with ESMTP id 2337DB784 for ; Fri, 15 Sep 2006 00:29:11 +0200 (CEST) Subject: Re: Retreive colummn name of a table from java From: yves pielusenet To: Derby Discussion In-Reply-To: <7921d3e40609141516i13671807ka2cfc026b3a5a57c@mail.gmail.com> References: <1158271676.6768.16.camel@localhost.localdomain> <7921d3e40609141516i13671807ka2cfc026b3a5a57c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Fri, 15 Sep 2006 00:31:43 +0200 Message-Id: <1158273104.6768.18.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N after tests I found this statement : ij> select columnname, columnnumber from sys.systables, sys.syscolumns where referenceid=tableid and tablename='DATA' order by columnnumber; which works well for me :) do you see something wrong ? Le jeudi 14 septembre 2006 à 15:16 -0700, Francois Orsini a écrit : > Yes, > > It all depends how you created the table - have you tried running the > query by specifying you table name in uppercase such as: > j> select columnnumber, columnname, columndatatype > from sys.systables t, sys.syscolumns, sys.sysschemas s > where tableid=referenceid and t.schemaid=s.schemaid > and schemaname='SYS' and tablename='DATA' > order by columnnumber; > > _or_ you can also run "select * from sys.systables" and find out if > your table appears in the list being retrieved...then check the actual > table identifier (aka name)... > > Hope this helps a bit, > > --francois > > On 9/14/06, yves pielusenet wrote: > Hello, > I read this : > http://wiki.apache.org/db-derby/ListTableColumns > > but I can't retreive the column of my table 'data'. Here is > what i > tested : > ij> select columnnumber, columnname, columndatatype > from sys.systables t, sys.syscolumns, sys.sysschemas s > where tableid=referenceid and t.schemaid=s.schemaid > and schemaname='SYS' and tablename='data' > order by columnnumber; > > And the result is : > > COLUMNNUMB&|COLUMNNAME|COLUMNDATATYPE > ------------------------------------------------------------------------------------------------------------------------------------------------------------ > > 0 lignes sélectionnées > > How can I do ? > > thanks, > > -- > yves piel > > >