[dba-SQLServer] SQL Server 2000 - View 3 records as 1 record

Paul Hartland Paul.Hartland at orridge.co.uk
Fri Mar 10 09:49:13 CST 2006


To all,

Sorry about the subject but didn't quite know how to word it (Friday and
getting tired now).....For an example lets say I have a query that
produces the following results:


JobDate		JobNo			Supervisors
13/03/2006	12345			Paul Hartland
13/03/2006	12345			Fred Bloggs
13/03/2006	12345			Someone Else

Because we do some large stores we can have anything upto 6
supervisors/managers on one job, the result I need to output would be
like below:

Jobdate		JobNo			Supervisors
13/03/2006	12345			Paul Hartland, Fred Bloggs,
Someone Else

Is there someway in a View or Stored Procedure that I can produce the
result above ?

Thanks in advance for any help/sample code on this.


PAUL HARTLAND
Database Designer/Programmer
paul.hartland at orridge.co.uk
DDI - 01922 472031
Mobile - 07730 523179

_______________________________________________

*  This message is confidential.
*  This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential.
*  Access by any other party is unauthorised without the express written permission of the sender.
*  If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail.
*  This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent.
*  Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates.

The Orridge web site can be found at:
http://www.orridge.co.uk





More information about the dba-SQLServer mailing list