I have three tables.
student(stud name,stud id)
subject(subid,subname)
stud details(stud name,stud id,sub name,marks)

I want to write a query or a stored procedure in sql server
such that the output should be a table
say any A1(stud name,sub1,sub2,sub3,total)

here sub1,sub2,sub3 are row values of sub name column in subject table.

I don want to use pivot and max here.
please provide me a query with joins and case.

Thanks

This is a forum to ask questions, not to post work and have it solved. Please ask a specific question about your task so we can help you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.