Tables Alias
———————- ————–
Employees ee
Skills sk
Emp_skills ese
Employee fields (table for all employees, listing only relevance fields)
Emp_id (PK)
Last_name
First_name
Emp_dept
Skill Fields (table for all skills, listing ony relevant fields)
Skill_id (PK)
Skill_desc
Emp_Skill fields (table which assigned employees skills are maintained)
Skill_id
Emp_id
The employee table is your typical employee table. There are unique emp_id?s for all employees. This report will also include the first, last name, emp_code and the employees dept.
Skill table is used to take an employee and match all skills they are assigned (by matching records in emp_skill) table and displaying employee names and skill names.
The only skill field that needs to display is the skill description. This is a single character identifier fir each skill. Non-manager positions are lowercase, and manangement skills are uppercase. It is possible for employees to have a upper and lowercase letter of the same value (ie. Aa,Bb,Cc, etc).
For each record matched (where there is an employee and skill I nemp_skill field I want to display the following:
Cook Supervisor
Barker, Bob ADFklmn
Mouse, Mickey DFGHJjklm
Prep Cook
Frost, Jack fghjikl
Fudd, Elmer lmnop
Wacks, Candel qrst
But when I do the join (excluding depts/dept names) I am getting…
Barker, Bob A
Barker, Bob D
Barker, Bob F
Barker, Bob k
Barker, Bob l
Barker, Bob m
Barker, Bob n
Mouse, Mickey D
Mouse, Mickey F
Mouse, Mickey G
Mouse, Mickey H
Mouse, Mickey J
Mouse, Mickey j
Mouse, Mickey k
Mouse, Mickey l
Mouse, Mickey m
How can I show each employee once and each skill in a single line ? I am NOT talking about suppressing duplicates. ALso, this will eventually have to be a stored procedure, how do I do that also?
Need more info, msg me ? Ill respond asap.