kentwoodjean
Technical User
Have a question on how best to set up a query. Have a table with information imported from one of our mainframe systems. The primary fields I am using on my query are:
Recvd Date
Contract Number
Name
Group Num
DeskCd
CaseCd
Status1
StatusDt1
Status2
StatusDt2
Status3
StatusDt3
Status4
StatusDt4
ETC
The status and StatusDt number all the way to 12. The pupose of the Status information is to show the current location of the case and the date it was sent. Sometimes the case can be sent 1 place (status1, StatusDt1) and returned (status2, StatusDt2) and sent to another location (status3, StatusDt3) etc.
I need to indicate on my query the most recent, or the last status and StatusDt of each open case. With that information I will also identify how long it has been in that location by using the current date minus the StatusDt.
Currently my query has all the status and StatusDt fields listed up to 12. Many of them are Null since the number of entries will depend on the number of times case was sent out and received back. I know that I cannot show Max for each of them to pull the most recently dated one. Does anyone have any ideas on how to set this up so my query will pull correctly?
Recvd Date
Contract Number
Name
Group Num
DeskCd
CaseCd
Status1
StatusDt1
Status2
StatusDt2
Status3
StatusDt3
Status4
StatusDt4
ETC
The status and StatusDt number all the way to 12. The pupose of the Status information is to show the current location of the case and the date it was sent. Sometimes the case can be sent 1 place (status1, StatusDt1) and returned (status2, StatusDt2) and sent to another location (status3, StatusDt3) etc.
I need to indicate on my query the most recent, or the last status and StatusDt of each open case. With that information I will also identify how long it has been in that location by using the current date minus the StatusDt.
Currently my query has all the status and StatusDt fields listed up to 12. Many of them are Null since the number of entries will depend on the number of times case was sent out and received back. I know that I cannot show Max for each of them to pull the most recently dated one. Does anyone have any ideas on how to set this up so my query will pull correctly?