Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!in.100proofnews.com!tdsnet-transit!newspeer.tds.net!newspeer.radix.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: lennart@kommunicera.umea.se (Lennart Jonsson)
Newsgroups: comp.databases.theory
Subject: Re: Many-to-many query question
Date: 1 Feb 2004 21:19:29 -0800
Organization: http://groups.google.com
Lines: 18
Message-ID: <6dae7e65.0402012119.51bfe55c@posting.google.com>
References: <28a69e7c.0402011530.2f493fc1@posting.google.com>
NNTP-Posting-Host: 194.236.201.101
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1075699170 23008 127.0.0.1 (2 Feb 2004 05:19:30 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 2 Feb 2004 05:19:30 +0000 (UTC)
Xref: newssvr20.news.prodigy.com comp.databases.theory:23718

jonck@vanderkogel.net (Jonck van der Kogel) wrote in message news:<28a69e7c.0402011530.2f493fc1@posting.google.com>...

[...]

> Now let's say I wan't to query for all the authors of book #1.
> Naturally this is very simple to do, but every way I think of returns
> two rows, whereas what I am looking for is to get this information in
> a single row. Can this be done?
>

In general no. What you are looking for is some kind of transpose
operation and that is normally handled in the application or in the
client layer. You can make a query that handle n authors, but it will
break for n+1 authors.


HTH
/Lennart
