Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Java & JDBC Table Aliasing...

Re: Java & JDBC Table Aliasing...

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 18 Nov 1999 14:01:05 GMT
Message-ID: <383406A1.5C39FCFC@edcmail.cr.usgs.gov>


You seem to have a syntax error in your statement.

SELECT xmen,l1.choice,l2.choice
FROM book, LookupTable li, LookupTable l2 WHERE book.team = li.id and book.play = l2.id

In the FROM clause, you alias LookupTable as "li" (lower case 'l' and lower case 'i') and in the SELECT clause, you reference "l1" (lower case 'l' and number '1'). The alias needs to be the same.

HTH,
Brian

Tina Creighton wrote:
>
> I've been trying to use table aliasing to use one table to lookup
> several values.
> for example:
>
> select xmen, l1.choice, l2.choice from Book, LookupTable li, LookupTable
> l2
> where book.team = li.id and book.play = l2.id.
>
> I get an error in JDBC.
> Anywone know how
Received on Thu Nov 18 1999 - 08:01:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US