[Solved]
I have a table tblGroupHistory, with the fields pID, gID, ghStartDate, ghComment. (pID refers to tblPerson, gID to tblGroup).
I would like to have a query with the number of days in a group, preferably with also the ghComment of both records.
Example:
Code:
pID gID ghStartDate ghComment
1 3 02/20/2018 excellent performance
2 6 02/23/2018
1 2 02/28/2018 group 3 was to much
Preferable result:
Code:
pID gID StartDate EndDate Days CommentStart CommentEnd
1 3 02/20/2018 02/28/2018 8 excellent performance group 3 was to much
2 6 02/23/2018
1 2 02/28/2018 group 3 was to much
(but a query that results in pID, gID, ghStartDate, ghComment, Days helps already a lot)
Can anyone help me with this?