MySQL Forums
Forum List  »  Oracle

Join between tables
Posted by: vissu pangam
Date: January 06, 2015 01:25AM

Hi All,

I have a table pa_master_details and lov_details.

In the pa_master_details table, I have role_comp_emp_final_rating and role_comp_lm_final_rating columns.

In the lov_details table I have a column rating lov_value and lov_text_en.

I need to join role_comp_emp_final_rating with the lov_value column to get lov_text_en Based on this lov_value, I need to show lov_text_en from the lov_details table.

So I wrote a query like this and am getting the result for emp rating:

SELECT p.employee_number,
p.role_comp_emp_final_rating,
lov_text_en,
p.role_comp_lm_final_rating
FROM pa_master_details P, lov_details L
WHERE p.role_comp_emp_final_rating = l.lov_value
AND p.employee_number = 34570
Similarly, I need to show lov_text_en for role_comp_lm_final_rating from the lov_details table by joining role_comp_lm_final_rating with lov_value in the same query.

How do I do it?

Options: ReplyQuote


Subject
Views
Written By
Posted
Join between tables
1798
January 06, 2015 01:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.