Hi Gurus
Can you please give me the exact sql query for this cross tab stuff
I have Dept and Employee table. I wanna the result as shown in the Results table
Dept | | | | | | | |
DeptCode | DeptName | | | | | | |
10 | Sales | | | | | | |
20 | IT | | | | | | |
30 | Accounts | | | | | | |
| | | | | | | |
Employee | | | | | | | |
EmpID | EmpName | Sal | DeptCode | | | | |
E0001 | Sanjay | 1000 | 10 | | | | |
E0002 | Praveen | 2000 | 10 | | | | |
E0003 | Senthil | 3000 | 20 | | | | |
E0004 | Sudip | 4000 | 20 | | | | |
E0005 | Arun | 5000 | 20 | | | | |
E0006 | Yogesh | 6000 | 30 | | | | |
| | | | | | | |
Result | | | | | | | |
Dept | DeptName | EmpName | Salary | EmpName | Salary | EmpName | Salary |
10 | Sales | Sanjay | 1000 | Praveen | 2000 | | |
20 | IT | Senthil | 3000 | Sudip | 4000 | Arun | 5000 |
30 | Accounts | Yogesh | 6000 | | | | |