I am relatively new to MS Access (and totally fresh in this forum ), and I have been asked to create the following query on a single table:
First - my table's structure:
ID - (PK) int
CprNr - int
InstId - int
IndmDato - Date
UdmDato - Date
...
And here's the challenge:
Find posts, where DateDiff("d",IndmDato,UdmDato)=1 - but in DIFFERENT rows, and then merge them into one row - as in the example below:
CprNr InstId IndmDato UdmDato
1234567 17 14-03-2009 31-12-2010
1234567 17 01-01-2011 01-05-2013 (1 day between the green dates)
Merge to:
CprNr InstId IndmDato UdmDato
1234567 17 14-03-2009 01-05-2013 (This can of course easily be done in another query)
Is this even possible It seems to me that I have looked everywhere...
And if it is - then how? I'm completely stuck here, so any help will be much appreciated.
First - my table's structure:
ID - (PK) int
CprNr - int
InstId - int
IndmDato - Date
UdmDato - Date
...
And here's the challenge:
Find posts, where DateDiff("d",IndmDato,UdmDato)=1 - but in DIFFERENT rows, and then merge them into one row - as in the example below:
CprNr InstId IndmDato UdmDato
1234567 17 14-03-2009 31-12-2010
1234567 17 01-01-2011 01-05-2013 (1 day between the green dates)
Merge to:
CprNr InstId IndmDato UdmDato
1234567 17 14-03-2009 01-05-2013 (This can of course easily be done in another query)
Is this even possible It seems to me that I have looked everywhere...
And if it is - then how? I'm completely stuck here, so any help will be much appreciated.