all groups > sql server msde > april 2007 >
You're in the

sql server msde

group:

Help With SQL Command


Help With SQL Command Charles A. Lackman
4/30/2007 1:17:26 PM
sql server msde:
I have the following Table

Table1

ID = Int
Division = VarChar
FirstName = VarChar
LastName = VarChar

This is an example of the Data (Select * From Table1)

ID Division FirstName LastName

1 E Chuck Martin
2 E Frank Smith
3 F Chuck Martin
4 G Chuck Martin
5 A Mark James
6 E Mark James

I would like the query to return the following (Example)

First + Last Divisions

Chuck Martin EFG
Frank Smith E
Mark James AE

I can do the First and Last Column, but don't know how to do the "Divisions"
Column.
Any assistance will be greatly appreciated.
Unfortunately, I cannot change the table.

Chuck

RE: Help With SQL Command Alejandro Mesa
4/30/2007 1:46:00 PM
Concatenating row values in T-SQL
http://www.projectdmx.com/tsql/rowconcatenate.aspx


AMB




[quoted text, click to view]
AddThis Social Bookmark Button