I have to update one column value with another columns' value based on some conditions. I can return the columns that need to be updated but I'm not sure how I would get the score value to update to the 1st columns value, see query below:UPDATE TBLRESULTSSTUDENTRAW SET SCORE = ??? WHERE TESTID = 2 AND UNIT= 0 AND STUDENTID IN (select studentid from tblResultsStudentRaw r where r.Score = 0 and r.testid = 2 and studentid in (select studentid from tblResultsStudentRaw where score > 0 and score is not null and testid = 1))
Basically, I want SET SCORE = ??? to be the value of the score for the record returned from the queryselect studentid from tblResultsStudentRaw r where r.Score = 0 and r.testid = 2 and studentid in (select studentid from tblResultsStudentRaw where score > 0 and score is not null and testid = 1)
It's friday..i'm tired..maybe it'll make more sense to me monday.thanks for your time,Dan