Cross Tab query

  • 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
    DeptCodeDeptName
    10Sales
    20IT
    30Accounts
    Employee
    EmpIDEmpNameSalDeptCode
    E0001Sanjay100010
    E0002Praveen200010
    E0003Senthil300020
    E0004Sudip400020
    E0005Arun500020
    E0006Yogesh600030
    Result
    DeptDeptNameEmpNameSalaryEmpNameSalaryEmpNameSalary
    10SalesSanjay1000Praveen2000  
    20ITSenthil3000Sudip4000Arun5000
    30AccountsYogesh6000    
  • 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