-
Combining column values
I have a table strucutred as (below) whereby using an SQL statemnt need to construct the return so that the 'Race #' column is in Distinct format, the 'Position' column concatinated for all the same 'Race #' and the 'Name' column also concatinated for all the same 'Race #'. ie the table below:
RACE # POSITION Name
12 1 Jhon
12 2 Peter
15 1 Frank
15 2 Peter
15 3 Phi
15 4 Jannet
16 1 Jannet
to query using SQL to return:
RACE # POSITION Name
12 [1 2] 1(Jhon) 2(Peter)
15 [1 2 3 4] 1(Frank) 2(Peter) 3(Phil) 4(Jannet)
16 [1] 1(Jannet)
Is it possible to do so using SQL, as I am trying to get a return that will bind to a Datagrid in .NET.
TIA.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|