A
alex
Hello experts,
Using Access ’03…
I’m trying to perform a query that’s rather complicated (at least to
me).
I have a table that provides the history actions on a particular case
(there are thousands of cases). This table lists the same case number
multiple times with the applicable action and date of each action.
You’ll find a snapshot below:
CASE ACTION ACT_DATE
XXX1234 9 200801091251
XXX1234 16 200711270731
XXX1234 6 200711231055
XXX1234 4 200710101438
XXX1234 16 200709101311
XXX1234 3 200707260650
XXX1234 1 200601262031
I’ve already isolated every CASE that has a ‘4’ ACTION after a ‘16’;
i.e., you won’t find a CASE with an ACTION of 4 and an ACT_DATE
earlier than any 16 (which is what I want).
What I need to do is find every case with an action of 16 subsequent
to an action of 4 with any action in between except 7-15 (like the
example case above). Something like = ACTION of 16, any number except
7-15, ACTION of 4, any number except 7-15, ACTION of 16.
What I would not want:
CASE ACTION ACT_DATE
XXX1235 9 200801091251
XXX1235 16 200711270731
XXX1235 10 200711231055
XXX1235 4 200710101438
XXX1235 16 200709101311
XXX1235 3 200707260650
XXX1235 1 200601262031
Also what I would not want:
CASE ACTION ACT_DATE
XXX1236 9 200801091251
XXX1236 4 200711270731
XXX1236 16 200711231055
XXX1236 3 200710101438
XXX1236 16 200709101311
XXX1236 3 200707260650
XXX1236 1 200601262031
Hope I haven’t confused too many people.
Thanks,
alex
Using Access ’03…
I’m trying to perform a query that’s rather complicated (at least to
me).
I have a table that provides the history actions on a particular case
(there are thousands of cases). This table lists the same case number
multiple times with the applicable action and date of each action.
You’ll find a snapshot below:
CASE ACTION ACT_DATE
XXX1234 9 200801091251
XXX1234 16 200711270731
XXX1234 6 200711231055
XXX1234 4 200710101438
XXX1234 16 200709101311
XXX1234 3 200707260650
XXX1234 1 200601262031
I’ve already isolated every CASE that has a ‘4’ ACTION after a ‘16’;
i.e., you won’t find a CASE with an ACTION of 4 and an ACT_DATE
earlier than any 16 (which is what I want).
What I need to do is find every case with an action of 16 subsequent
to an action of 4 with any action in between except 7-15 (like the
example case above). Something like = ACTION of 16, any number except
7-15, ACTION of 4, any number except 7-15, ACTION of 16.
What I would not want:
CASE ACTION ACT_DATE
XXX1235 9 200801091251
XXX1235 16 200711270731
XXX1235 10 200711231055
XXX1235 4 200710101438
XXX1235 16 200709101311
XXX1235 3 200707260650
XXX1235 1 200601262031
Also what I would not want:
CASE ACTION ACT_DATE
XXX1236 9 200801091251
XXX1236 4 200711270731
XXX1236 16 200711231055
XXX1236 3 200710101438
XXX1236 16 200709101311
XXX1236 3 200707260650
XXX1236 1 200601262031
Hope I haven’t confused too many people.
Thanks,
alex