T
Tamara
Here's what the data might look like:
ID M MStatus Appl ApplStatus Art ArtStatus Appr ApprStatus
-- --- -------------- ----- -------------- ------ -------------- ------
------------
1 M1 In Progress 1A In Progress MA1 In Progress AP1 Pending
1 M1 In Progress 1A In Progress MA1 In Progress AP2 Pending
1 M1 In Progress 1A In Progress MA1 In Progress AP2 Approved
1 M1 In Progress 1A In Progress MA1 Complete AP2 Approved
1 M1 In Progress 1A Complete MA1 In Progress AP3 Pending
1 M1 Complete 1A In Progress MA1 Complete AP3 Approved
Each:
- Unique ID has 1-N milestones
- Milestone has 0-N applications
- Application (or if no Application, Milestone) has 1-N Artifacts
- Artifact has 1-N Approvers
The process is when All:
- Approver Status = Approved then the Artifact Status = Complete
- Artifact Status = Complete then the Application Status = Complete
- Application Status = Complete then the Milestone Status = Complete
Logic dictates that since there are multiple records, that all records would
get updated with the "complete" status but nooooo...that is not the case as
you can see. I have records with conflicting information. Sadly I have no
control over how the data is stored and updated. I can only retrieve the
data set and pull the desired records out of this pizzaship table.
So hopefully I know what I need to do (below) ... and I need help on how to
do it:
1) pull all records for ID and Milestone
2a) if there is one record where Milestone Status = complete then throw all
records in the query away (or save records somewhere where Status <> complete)
2b) if not, run a subquery on ID/Milestone/Application
3a) if there is one record where Application Status = complete then throw
all records in query away
3b) if not, run a subquery on ID/Milestone/Application/Artifact
4a) if there is one record where Artifact status = complete then throw all
those records
4b) if not, run a subquery to find duplicate
ID/Milestone/Application/Artifact/Approver and delete any duplicate records
5) Then count the remaining artifacts where Artifact Status <> Complete
6) Repeat from Step 1
I figure some sort of iterative query (which I haven't been able to figure
out) and either 1) delete records, 2) flag records, or 3) append remaining
records in a new table (or another option that someone smarter than me can
suggest).
Oh...and since I'm not a programmer and need to pass this on to someone else
with no programming experience, VB probably is not a good option.
TIA for any guidance and suggestions. Regards -Tamara
ID M MStatus Appl ApplStatus Art ArtStatus Appr ApprStatus
-- --- -------------- ----- -------------- ------ -------------- ------
------------
1 M1 In Progress 1A In Progress MA1 In Progress AP1 Pending
1 M1 In Progress 1A In Progress MA1 In Progress AP2 Pending
1 M1 In Progress 1A In Progress MA1 In Progress AP2 Approved
1 M1 In Progress 1A In Progress MA1 Complete AP2 Approved
1 M1 In Progress 1A Complete MA1 In Progress AP3 Pending
1 M1 Complete 1A In Progress MA1 Complete AP3 Approved
Each:
- Unique ID has 1-N milestones
- Milestone has 0-N applications
- Application (or if no Application, Milestone) has 1-N Artifacts
- Artifact has 1-N Approvers
The process is when All:
- Approver Status = Approved then the Artifact Status = Complete
- Artifact Status = Complete then the Application Status = Complete
- Application Status = Complete then the Milestone Status = Complete
Logic dictates that since there are multiple records, that all records would
get updated with the "complete" status but nooooo...that is not the case as
you can see. I have records with conflicting information. Sadly I have no
control over how the data is stored and updated. I can only retrieve the
data set and pull the desired records out of this pizzaship table.
So hopefully I know what I need to do (below) ... and I need help on how to
do it:
1) pull all records for ID and Milestone
2a) if there is one record where Milestone Status = complete then throw all
records in the query away (or save records somewhere where Status <> complete)
2b) if not, run a subquery on ID/Milestone/Application
3a) if there is one record where Application Status = complete then throw
all records in query away
3b) if not, run a subquery on ID/Milestone/Application/Artifact
4a) if there is one record where Artifact status = complete then throw all
those records
4b) if not, run a subquery to find duplicate
ID/Milestone/Application/Artifact/Approver and delete any duplicate records
5) Then count the remaining artifacts where Artifact Status <> Complete
6) Repeat from Step 1
I figure some sort of iterative query (which I haven't been able to figure
out) and either 1) delete records, 2) flag records, or 3) append remaining
records in a new table (or another option that someone smarter than me can
suggest).
Oh...and since I'm not a programmer and need to pass this on to someone else
with no programming experience, VB probably is not a good option.
TIA for any guidance and suggestions. Regards -Tamara