I created a stored procedure that gets the maximum for hours for monday to Friday and one for Saturdays and Sundays.SELECT SUM(Minutes) AS TotalMinutes FROM Clocking WHERE (DATENAME(dw, ClockTime_In) IN ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday')) AND (StaffID = '10001') AND (ClockTime_In BETWEEN '2010.11.11' AND '2010.11.18')This result gives me 345If I put this exact same query in stored proc and assign a integer variable called @Week to it then I get NullSelect @Week = (SELECT SUM(Minutes) AS TotalMinutes FROM Clocking WHERE (DATENAME(dw, ClockTime_In) IN ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday')) AND (StaffID = '10001') AND (ClockTime_In BETWEEN '2010.11.11' AND '2010.11.18')) What am I doing wrong.Thx