Doing Cross Tab in LInq

  • Thread starter Thread starter kingfung_lam
  • Start date Start date
K

kingfung_lam

Does anyone know how to do cross tab report (PIVOTE) in Linq?

I wanna translate something like :

SELECT YearofJoining, [1] as [Department-1],[2] as [Department-2],
[3] as [Department-3] FROM
(SELECT YearOfJoining,Deptid from #MyTable) p
PIVOT
( Count(DeptId) for DEPTID in ([1],[2],[3]))
AS pvt
ORDER BY Yearofjoining



into Linq
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top