brainstorms
Technical User
I have a database structured as follows:
tblcases (caseid, name, date) where date is the date the 'case' was first opened
tblclosed (closedid, caseid, closedate) where closedate is the date the 'case' was closed
tblreopen (reopenid, caseid, reopendate) where reopendate is the date the 'case' was reopened
tblclosed and tblreopen have a one-to-many relationship with tblcases
All 'cases' can be opened, then closed and reopened any number of times.
I need to create a query which will tell me how many 'cases' were open on a specific date. I cannot work out how to structure this and end up with multiple instances of records where they have several closed and re-opened dates. Getting how many cases are open today is easy. But how to get how many were open at a specifi date or within a range of dates I cannot figure.
Is the basic table structure wrong?
This is really urgent (aren't they all!) I'm trying to complete a job with this.
Any help greatly appreciated.
tblcases (caseid, name, date) where date is the date the 'case' was first opened
tblclosed (closedid, caseid, closedate) where closedate is the date the 'case' was closed
tblreopen (reopenid, caseid, reopendate) where reopendate is the date the 'case' was reopened
tblclosed and tblreopen have a one-to-many relationship with tblcases
All 'cases' can be opened, then closed and reopened any number of times.
I need to create a query which will tell me how many 'cases' were open on a specific date. I cannot work out how to structure this and end up with multiple instances of records where they have several closed and re-opened dates. Getting how many cases are open today is easy. But how to get how many were open at a specifi date or within a range of dates I cannot figure.
Is the basic table structure wrong?
This is really urgent (aren't they all!) I'm trying to complete a job with this.
Any help greatly appreciated.