I'm not sure exactly how to describe what I want to do, so I'll use a contrived example
On SQL Server 2005, Say I have a view with rows like this, call it vwGrades:
ID AssnDate AssnTxt Sally Ted Bob
----------- ----------------------- ------------- ----------- ----------- -----------
2999 2007-09-22 00:00:00 Homework #1 20 NULL NULL
2999 2007-09-22 00:00:00 Homework #1 NULL 0 NULL
2999 2007-09-22 00:00:00 Homework #1 NULL NULL 24
2999 2007-09-22 00:00:00 Final Exam 57 NULL NULL
2999 2007-09-22 00:00:00 Final Exam NULL 0 NULL
2999 2007-09-22 00:00:00 Final Exam NULL NULL 35
How can I query it, such that I get this, ridding myself of all the annoying nulls and duplicate rows?
ID AssnDate AssnTxt Sally Ted Bob
----------- ----------------------- ------------- ----------- ----------- -----------
2999 2007-09-22 00:00:00 Homework #1 20 0 24
2999 2007-09-22 00:00:00 Final Exam 57 0 35