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?

kindly post the code that you working on, for further assistance from our experts.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.