0

I have a table with two columns (Date, Subject), I have created a query from it with three columns (MName, Subject, Counting) and also I have created a Dynamic crosstab query.

All of these I have done in MS Access easily.

My question is how can I create this 'Dynamic crosstab query' in SQL server.

My Table

Query

Dynamic Crosstab Query

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • Check out the discussion on [SQL Server dynamic PIVOT query?](https://stackoverflow.com/questions/10404348/sql-server-dynamic-pivot-query). That should give you some ideas of what to try. – Isaac Apr 28 '21 at 13:22
  • Does this answer your question? [SQL Server dynamic PIVOT query?](https://stackoverflow.com/questions/10404348/sql-server-dynamic-pivot-query) – Charlieface Apr 28 '21 at 14:40
  • Yes, It is. Please take a look at images I attached, I will be grateful if u Convert this access crosstab to sql server pivot – Nuzheen Kazim Apr 28 '21 at 15:35

0 Answers0