Here's the issue: we have a query comprised of several CTEs that eventually reduce to a final select.
The scenario is: An employee's activity can be in one or more of 5 stages of activity.
Employee Activity Stage
Joe Activity A 1
Joe Activity A1 2
NULL No Activity 3
Joe Activity G 4
Joe Activity K 4
NULL No Activity 5
It's OK to have NULL in the activity - a CASE statement tests for NULLS and pops in the
'No Activity' text, but each record has to have the employee name in it.
The scenario above is reduced to its specifics for an example. The SELECT uses a CTE derived table which is joined to a temp table which collects the Stage Number - the join is on the stage number to generate at least 1 record for each stage. We can generate all 5 stage numbers in an employee record collection - what we need assistance in is getting the employee name in every record.
In brief - an employee may have 3 activities in 3 stages. We have to show the stage number and employee name for all 5 stages, even though the employee has no activity for a particular stage. We're at the point where we can generate all the required stages, with their appropriate stage number, but we have been unsuccessful in populating the 'generated' record with the employee name.
Suggestions?
Crystal Reports Design/training/Consultation
earljgray@gmail.com
The scenario is: An employee's activity can be in one or more of 5 stages of activity.
Employee Activity Stage
Joe Activity A 1
Joe Activity A1 2
NULL No Activity 3
Joe Activity G 4
Joe Activity K 4
NULL No Activity 5
It's OK to have NULL in the activity - a CASE statement tests for NULLS and pops in the
'No Activity' text, but each record has to have the employee name in it.
The scenario above is reduced to its specifics for an example. The SELECT uses a CTE derived table which is joined to a temp table which collects the Stage Number - the join is on the stage number to generate at least 1 record for each stage. We can generate all 5 stage numbers in an employee record collection - what we need assistance in is getting the employee name in every record.
In brief - an employee may have 3 activities in 3 stages. We have to show the stage number and employee name for all 5 stages, even though the employee has no activity for a particular stage. We're at the point where we can generate all the required stages, with their appropriate stage number, but we have been unsuccessful in populating the 'generated' record with the employee name.
Suggestions?
Crystal Reports Design/training/Consultation
earljgray@gmail.com