0

Hi Friends

I have a challenging task in SQL (Oracle). Let me know if you have any answer.

I have 2 tables. 1. Dept 2. Employee

Dept

Dept_No Dept_Name
10 Admin

20 Data Warehousing

30 HR

Employee

Employee_No Employee_Name Dept_No[/B]
E01 Sangeetha 10

E02 Michael 10

E07 Immanuel 20

E11 Vasudev 20

E22 Elizabeth 20

E08 Vanmathi 30

E44 Latha 30

My Output should be

Dept_No Dept_Name Employee_No Employee_Name

10 Admin E01 Sangeetha

10 Admin E02 Michael

10 Admin

10 Admin

20 Data Warehousing E07 Immanuel

20 Data Warehousing E11 Vasudev

20 Data Warehousing E22 Elizabeth

20 Data Warehousing

20 Data Warehousing

20 Data Warehousing

30 HR E08 Vanmathi

30 HR E44 Latha

30 HR

I.e. at least 4 records for dept 10, 6 records for dept 20 and 3 records for dept 30. Please let me know how to do this?

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by debasisdas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.