473,473 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

intersect in mysql

2 New Member
Can any one give an alternative to this oracle query in mysql
Expand|Select|Wrap|Line Numbers
  1. Select s.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id) 
  2. join profilesys.employee_master s on(p.EMP_CODE = s.EMP_CODE) 
  3. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  4. where (PROFICIENCY_LEVEL >= '"+skillLevel+"' and p.skill_id = '"+skill+"' and PROJECT_EXPERIENCE >= '"+exp+"')
  5.  
  6. intersect
  7.  
  8. Select s.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id) 
  9. join profilesys.employee_master s on(p.EMP_CODE = s.EMP_CODE) 
  10. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  11. where (PROFICIENCY_LEVEL >= '"+skillLevel2+"' and p.skill_id = '"+skill2+"' and PROJECT_EXPERIENCE >= '"+exp2+"')
  12.  
  13. intersect
  14.  
  15. Select s.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id) 
  16. join profilesys.employee_master s on(p.EMP_CODE = s.EMP_CODE) 
  17. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  18. where (PROFICIENCY_LEVEL >= '"+skillLevel3+"' and p.skill_id = '"+skill3+"' and PROJECT_EXPERIENCE >= '"+exp3+"')
  19.  
Nov 1 '07 #1
1 1684
kadhir34
2 New Member
Expand|Select|Wrap|Line Numbers
  1. Select s.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id)  
  2. join profilesys.employee_master s on (p.EMP_CODE = s.EMP_CODE) 
  3. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  4. where (PROFICIENCY_LEVEL >= '1' and p.skill_id = '2' and PROJECT_EXPERIENCE >= '3')
  5.  
  6. AND     EXISTS(
  7. Select l.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id)  
  8. join profilesys.employee_master l on (p.EMP_CODE = l.EMP_CODE) 
  9. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  10. where (PROFICIENCY_LEVEL >= '2' and p.skill_id = '3' and PROJECT_EXPERIENCE >= '3')
  11. AND    (s.EMP_CODE  = l.EMP_CODE) AND    (s.fname  = l.fname))
  12.  
  13. AND     EXISTS(
  14. Select q.EMP_CODE,fname from profilesys.skill_emp_master P join profilesys.skill_master_new R on ( P.Skill_id = r.skill_id)  
  15. join profilesys.employee_master q on (p.EMP_CODE = q.EMP_CODE) 
  16. AND UPPER(coalesce(R.STATUS,'WORKING')) NOT IN ('RETIRED','RESIGNED','ABSCONDING') 
  17. where (PROFICIENCY_LEVEL >= '1' and p.skill_id = '4' and PROJECT_EXPERIENCE >= '3')
  18. AND    (q.EMP_CODE  = s.EMP_CODE) AND    (q.fname  = s.fname))
  19.  
Nov 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Nick | last post by:
I have three tables books (id, title, author) authors (id, name) authors_groups (author_id, group_id) I have a query that searches for authors who must be in a least one subgroup of two...
1
by: sunaina | last post by:
I am doing the following query using intersect but gives me an error 'error in sql syntax. I tried using join as well but gives me similar error. In the following code still has intersect just to...
1
by: Brian | last post by:
Greetings all, I wrote a message regarding hit-lines here a couple of days back saying: "Anyone got links to some examples of using Region and/or Region.Intersect in a graphical / gaming...
2
by: ngenius | last post by:
Hello everyone, I am new to MySQL but just realized it does not support INTERSECT in MySQL 5.0 Community Server. I have this problem to solve. (1) cust_table cust_id city_code. ...
1
by: Xpertboy | last post by:
i am trying to execute following code in asp var strSQL1="select Model from Phones where Brand='"+ brand +"'"; var strSQL2="select Model from Phones where Model='"+ model +"'"; var...
3
by: prathamesh.deshpande | last post by:
Hi, I am facing problem while excuting a mysql query. My problem is as follows- I have two tables object_1 and object_2. The structure of object_1 is object_id name address ------------...
3
by: bzb | last post by:
hi ALL, I have a situation to use INTERSECT in my query, but INTERSECT is not supported in "mysql 4.1.15". Can anyone explain me how to tackle this problem..... ! Also, is there...
0
by: egur | last post by:
Hi, I'm looking for reliable MySQL version (for Windows) that supports "EXCEPT" and "INTERSECT" execution. Would somebody recommend such version (and corresponding client), please?
1
by: b00010783 | last post by:
Hi all, I have the table below. +--------+---------+-------------+--------------------------------+-------+----+ | parent | country | city | hotel | stars | id | ...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.