July 12, 2005 at 1:13 am
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 |
July 13, 2005 at 4:14 am
you can check this site for numerous pivot table scripts threads and articles.
Those could answer your question
Bye
Gabor
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy