473,473 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL Statement Help

Hello Everyone!

I'm wondering if someone could help me out with this problem. We have
a database in Access for our library. We also have it linked to a web
search. If a book is authored by two or more authors, when the results
show up, the book is listed once for each author of that book. If it
is possible, I would like to have the book just listed once, with all
of the authors. I am pasting my code, perhaps it something in my SQL
statement that I can change to allow that to happen.

I am posting links to screen shots of the database structure, and the
results page, to make things more clearer.
SQL CODE:

SELECT Books.Title, Books.CopyrightYear, Books.ISBNNumber,
Books.PublisherName, Books.Pages, Books.CoverType, Authors.FirstName,
Authors.LastName, Topics.Topic FROM Authors INNER JOIN ((Topics INNER
JOIN Books ON Topics.TopicID = Books.TopicID) INNER JOIN BookAuthors
ON Books.BookID = BookAuthors.BookID) ON Authors.AuthorID =
BookAuthors.AuthorID where Books.Title Like '%" & l_title & "%'"

Database Relationship Structure
http://www.rit.edu/~vjl4414/relationships2.jpg

The Results Page
http://www.rit.edu/~vjl4414/resultsscreen2.jpg

SQL Code
http://www.rit.edu/~vjl4414/SQL%20CODE2.jpg
Any help wouuld be grealy appreciated!

Thank You!
Nov 13 '05 #1
2 1161
how do you envisage all the authors to be listed in
a. one field
b. different rows
c. different columns
????

it can be all done, but it would help if you decided on this.
Nov 13 '05 #2
Only way around getting the book title to appear only once is to
either use a summary query by title/ISBN or use the code at mvps.org
to concatenate the authors field in your result set.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: James E Koehler | last post by:
I can't get the WHILE statement to work in MySQL. The version of MySQL that I am using is: Ver 12.16 Distrib 4.0.6-gamma, for Win95/Win98 (i32) running on Windows MX. Here is the relevant...
5
by: WindAndWaves | last post by:
Hi Team The function below searches all the tables in a database. However, if subsearch = true then it searches all the objects listed in a recordset (which are all table names). I thought to...
11
by: Scott C. Reynolds | last post by:
In VB6 you could do a SELECT CASE that would evaluate each case for truth and execute those statements, such as: SELECT CASE True case x > y: dosomestuff() case x = 5: dosomestuff() case y >...
10
by: John Smith | last post by:
Can you do a Select Statement within a Select Statement? I want to build a query similar to queries built in Access which link to other queries but using only SQL Statements. Is it possible? If...
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.