Am I missing something? Seems to me that this should work:
select cStudentID, cCurrentGradeCode, cAnticipatedGradeCode
from #temp
where cCurrentGradeCode <> '99' or cAnticipatedGradeCode <> '99'
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/