Select statement

From: Steven Richardson (steve_at_cheltenhamdirectory.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 17:03:07 +0100

Anyone know how two join muliple records into 1.

I have 3 tables like the Pubs DB.

Authors
Titles
TitleAuthors

This allows for many to many relationships.

I need to be able to query this database so I can import titles & authors to
a system that does not deal with many to many relations ships & so want the
query to return the authors in one colum like below.

title_id fulltitle author1
title_id fulltitle author1, author2, author3
title_id fulltitle author2, author3
etc..
etc..

I would imagine there would be someway of doing this in a function or a
cursor.

Many Thanks
Steve



Relevant Pages

  • Multiple Records into 1
    ... Anyone know how two join muliple records into 1. ... I have 3 tables like the Pubs DB. ... I need to be able to query this database so I can import titles & authors to ... title_id fulltitle author1, author2, author3 ...
    (microsoft.public.sqlserver.programming)
  • Join multple records
    ... Anyone know how two join muliple records into 1. ... I have 3 tables like the Pubs DB. ... I need to be able to query this database so I can import titles & authors to ... title_id fulltitle author1, author2, author3 ...
    (microsoft.public.sqlserver.programming)