|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Struggling w/ SQL statement...not sure if its possible
I have 3 tables:
employees, skills and employee_skills The employees table has the following columns: emp_name emp_id the skills table has the following columns: skill_id skill_name the emp_skills table has the following columns: emp_id skill_id skill_level This is from a database that keeps info about call types (skills) for analyst in a center. I am trying to create view that has a column for the emp_name and a column for each skill name. I cant for the life of me get this to work...anyone provide any help? Example of what I want EMP NAME skill1 skill2 skill3 Marcus 2 3 7 Jim 9 4 3 |
|
#2
|
||||
|
||||
|
Without seeing any sample data, this is the best I can do.
Code:
SELECT A.EmpName, C.SkillName FROM Employees As A INNER JOIN EmployeeSkills As B On (A.EmpID = B.EmpID) INNER JOIN Skills As C On (B.SkillID = C.SkillID) ORDER BY A.EmpName |
|
#3
|
|||
|
|||
|
If i just made a real quick sample access db, would this work?
|
|
#4
|
|||
|
|||
|
Quote:
http://www.noworkethic.com/skills.mdb I just tossed up a real quick example set of data. |
|
#5
|
||||
|
||||
|
try this
|
|
#6
|
|||
|
|||
|
memnoch -
thanks for the help. that's what i was able to get, but not what I am looking for. What i would like the query to return for the columns in the table is a column for emp_name from the employees table, and a column each for each of the values of skill_name in the skill table. So a column for emp_name, a column for "basic", a column for "medium" and a column for "advanced". The data in each row would need to be the value of emp_name from employees, and the value for skill_level from the emp_skills table for each of the skill_name columns. thanks! |
|
#7
|
|||
|
|||
|
anyone else have any input?
|
|
#8
|
|||
|
|||
|
See Attached
You can do this, but there are limiations as you will find out S- |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Struggling w/ SQL statement...not sure if its possible |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|