Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Eliminating non-distinct duplicates

Author  Topic 

mattt
Posting Yak Master

194 Posts

Posted - 2001-11-16 : 10:06:46
Hi,

I've inherited a database which contains two tables. One of the tables contains information about books, the other about authors. One of the author fields is 'organisation' and it is, of course, possible for one author to belong to multiple organisations. When I query these linked tables using DISTINCT though I get multiple records back for the same book if the author belongs to more than one organisation. The two tables are linked through a third table which pairs the bookref (unique key) with authorref(unique key). How can I construct a query which will return a single record for each unique book but with multiple entries in the 'organisation' field?

   

- Advertisement -