Hi, I have an sql server table that looks like this:
The two columns on the table are Salesman and Project.
Salesman------Project
John------------ProjectOne
Mark-----------ProjectTwo
John------------ProjectOne
So, every salesman has a project asigned to him, but also a salesman can have the same project asigned twice. The number of the salesmans and projects can change.
When retrieving this data from an asp.net website, i would like to load it in a gridview, but i want the data showing like this:
Salesman------ProjectOne------ProjectTwo-----
John-----------------2------------------0------
Mark----------------0------------------1------
The name of the project on the top columns, the name of the salesman on the left, and on each corresponding cell the number of times a salesman is involved in a project.
How can i do this?
thanks.
...
Go to the complete details ...