Home » SQL & PL/SQL » SQL & PL/SQL » Homeowrk Help: Joining Multiple Tables (Oracle 9i)
Homeowrk Help: Joining Multiple Tables [message #400079] Sat, 25 April 2009 18:10 Go to next message
gto400no1
Messages: 3
Registered: March 2009
Location: NJ
Junior Member
I have been stuck on this for over an hour now and tried many different things with no luck. The question the book asks is to find which book was written by an author with the last name Adams.

Heres what Ive wrote so far, I get no results but no errors.
Quote:
select title
from bk_auth, bk_book, bk_book_auth
where bk_auth.authid=bk_book_auth.authid and bk_book_auth.isbn=bk_book.isbn
and lname='Adams';


also I am only in relational database 1 so an advanced way isn't what I can use.

Thank you in advanced for any help.

[Updated on: Sat, 25 April 2009 18:14]

Report message to a moderator

Re: Homeowrk Help: Joining Multiple Tables [message #400080 is a reply to message #400079] Sat, 25 April 2009 18:32 Go to previous message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
SELECT title 
FROM   bk_auth, 
       bk_book, 
       bk_book_auth 
WHERE  bk_auth.AUTHID = bk_book_auth.AUTHID 
       AND bk_book_auth.isbn = bk_book.isbn 
       AND lname = 'Adams';

Your SQL means the Last Name is Case Sensitive

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.

>I have been stuck on this for over an hour now and tried many different things with no luck.
In the future please be more vague about the results.
Without having your tables & data, nobody can know why you have "no luck".

Post DDL for tables.
Post DML for test data.

Post expected/desired results.

Since only 1 column is in the SELECT clause, only 1 table should be in the FROM clause.
The other 2 tables should be subordinated into WHERE clause.

[Updated on: Sat, 25 April 2009 18:37]

Report message to a moderator

Previous Topic: Alias in ORDER BY
Next Topic: Table Join
Goto Forum:
  


Current Time: Sun Dec 04 20:38:24 CST 2016

Total time taken to generate the page: 0.06499 seconds