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

Haslett, Andrew andrew.haslett at ilc.gov.au
Fri Mar 10 15:16:20 CST 2006


Try this:

http://www.4guysfromrolla.com/webtech/092105-1.shtml

Cheers.
Andrew 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul
Hartland
Sent: Saturday, 11 March 2006 2:19 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] SQL Server 2000 - View 3 records as 1 record
Importance: High

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


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com



IMPORTANT - PLEASE READ *** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not.



More information about the dba-SQLServer mailing list