Mighty Morphin' Job Descriptions.

From: Frampton Steve R <3srf_at_qlink.queensu.ca>
Date: 18 Oct 1994 19:27:09 GMT
Message-ID: <3817id$4kp_at_knot.queensu.ca>


Hello:

I have a view which selects a variety of information from joined tables, including employee ID #, work location, hours-per-week, name, and job description.

All this information is grouped, so that if the employee has more than one position, but all the information is the same (this would happen when an employee has the same position, but split into multiple G/L accounts, for one example) only one record would be returned.

But if everything is the same, but the job description is different for each position, each record is returned. Thus:

Emp. ID Location Hours/week Name Job Description

-------  --------  ----------  --------------- -----------------
11201    15        20          Smith           Classroom Teacher
11201    15        20          Smith           Vice-Principal

In the above example, every field is the same except for the job description. Therefore, I would like to "morph" (ahem) them into something like:
'Classroo/Vice-Pri' (the first 8 characters of each description) or perhaps
'Multiple Posn.' would suffice. Then I would only like *one* record

returned with the "morphed" description, and the hours-per-week totalled. In keeping with our example:

Emp. ID Location Hours/week Name Job Description

-------  --------  ----------  --------------- -----------------

11201    15        40          Smith           Classroo/Vice-Pri
                  ^^^^ (sum of hours)

How do I accomplish this? Remember, if any one or more field differs then I truly wish to see all the records returned.

Any information would be greatly appreciated. Thanks in advance. Received on Tue Oct 18 1994 - 20:27:09 CET

Original text of this message