-
Hi,
I need an urgent help in SQL. Here is my problem.
Table A :
Eno
SkillCode
Table B :
SvcCode
Table C :
SvcCode
SkillCode
Now for 1 SvcCode there can be multiple Skill Codes.
I want to find out the list of employees (Eno) who has got all the Skills for a particular SvcCode.
Please help me....I need an urgent solution.
Thank you,
Amitava
-
select eno from table A where
skillcode in(select skillcode from table C where SvcCode = &Enter_the_SvcCode);
Hope this is the answer you were looking for.
-
Another possible solution:
select a.eno
from a,c
where c.skillcode=a.skillcode
and c.svccode=particular_svc_code;
-
Sorry but this is not the solution which I was looking for.
These queries will give me the employees who has got even some of the skills required for a particular service.
But I need only those employees who has got ALL the skills for a particular service.
relationship between Table A and C is many to many
Between Table B and C is one to many.
-
select a.eno,c.skillcode from tablea a,tablec c where
a.skillcode=c.sillcode and c.svccode=&svccode;
anandkl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|