Thank you!! in the Event the EventID is a UID for the specific event. EventType is a FK to the EventType table. So there should be 2 parties (event id 1 and 2) and 1 meeting (event id 3) I need to look up how this XML stuff works :/
nallelcm
Posts
-
GROUP BY and listing rows in an aggrigate -
GROUP BY and listing rows in an aggrigateOk, well how well would this translate into this situation. I never really did explain myself very well.. here is a better example EventType
ID Name
1 Party
2 MeetingPerson
ID Name
1 Bob
2 Joe
3 SuzieEvent
UID EventID EventType Person
1 1 1 1
2 1 1 2
3 1 1 3
4 2 1 1
5 2 1 3
6 3 2 1
7 3 2 2Want the output to look like
EventID EventTypeName People
1 Party Bob, Joe, Suzie
2 Party Bob, Suzie
3 Meeting Bob, Joe -
GROUP BY and listing rows in an aggrigatehere is my problem.
table: Employees
id name position1 bob sales
2 joe sales
3 mark management
4 jane management
5 julie it
6 donald saleswhat I want to do is write a query that would spit out
position people
sales bob, joe, donald
management mark, jane
it julieso something like this
SELECT position, somefunction(names) AS people FROM Employees GROUP BY position
does that 'somefuction' exist? if not how would i emulate it. I'm doing this for reporting purposes.