Yes.

BOOK Table:

Book_ID  (Autonumber or Identity in SQL)
Book_Name (text)
Book_SBN (text or Integer)
Author_ID (integer)
Category_ID (integer)
Language_ID     (integer)

Author Table:
Author_ID (Autonumber or Identity in SQL)
Author_Name (text)

Category Table
Category_ID (Autonumber or Identity in SQL)
Category (text)

Language Table
Language_ID (Autonumber or Identity in SQL)
Language (Text)



Single SQL STatement

Select B.Book_Name, B.Book_SBN, A.Author_Name, C.Category, L.Language
>From Book B
        INNER JOIN Author A ON A.Author_ID = B.Author_ID
        INNER JOIN Category C ON C.Category_ID = B.Category_ID
        INNER JOIN Language L ON L.Language_ID = B.Language_ID


That should be real close to what you need


-----Original Message-----
From: Hamid Hossain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 11:52 AM
To: CF-Talk
Subject: come on Forta !


Hi folks,

I'v just ordered Ben Forta's new book. I am woundering
if I will find a way to solve this problem. I have the
following database tables:


                ------- many -- Authors
                |              (Table)
                |
                |
                |
 Books - many --------- many -- Categories
(Table)         |               (Table)
                |
                |
                |
                ------- many -- Languages
                                (Table)


As you can see, Three tables are linked to (Books)
table in many to many relations. I want to output a
list of all books with all (Authors), (Categories) and
(Languages) of each single book.

Could you please help me with the best way doing that.
In another way, Can I do it with a single query?!.

Any CF code will be appreciated.

Regards,
Hamid Hossain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to