Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I need immediate help guyssssss. The scenario is like this:
I have 3 tables: subject,class and mark which have details subjectid,subject in subject; classid, classname in class; markid, classid,subjectid,marks in mark.
I want to display the details in a form like class forms the header text vertically, subject horizontally and marks corresponding to (class,subject).
Below is the required output/gridvew...i tried lots of ways..not working..

Class/Subject	Class 5 Class 6 Class 7
abcd              66      62	  56	 Delete
efg               77      77      55     Delete
rst               56      87      98     Delete
Posted
Updated 4-Jun-13 20:08pm
v2
Comments
Can you post what you have tried so far?
ExpertITM 5-Jun-13 0:03am    
You have to use pivoting in sql server
vaibhav10Dec1987 5-Jun-13 1:47am    
if you are using a sql server database for fetching these record, then why r you not using join? Or Can you post a code in which what you have done.
VishwaKL 5-Jun-13 2:18am    
yes Vaibhav you are right, he should use joins for his query
Member 7677029 5-Jun-13 6:39am    
how can we use join...i am not getting in this form while using join..i mean i want the output like the design i have shown..can u pl give me an example? suppose the tables are subject,class,marks; how to get data shown as in figure????

1 solution

how can we use join...i am not getting in this form while using join..i mean i want the output like the design i have shown..can u pl give me an example? suppose the tables are subject,class,marks; how to get data shown as in figure????
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900