Try:
SELECT CAST((SUM(HOURS)*60+SUM(MINS))/60 as float) +
(CAST((SUM(HOURS)*60+SUM(MINS))%60 as float)) / 100
FROM MyTable
WHERE ...
I have tried again. i am not able to find out any difference in my code which one i posted. If you dont mind,please can you rectify my code and reply me.
Look at your code.
Your original question was about adding hours and minutes in two columns, and converting teh result to a float.
If what you are trying to do is add two hour columns to two minute columns, and return that as a float *for each row* then it is different: you need to convert the hours to minutes, add them together with the other two minutes, and convert the result back to hours and minutes, then convert that to a float.
So, you don't need SUM at all:
SELECT CAST((Effort1*60 + Effort2 * 60 + Effort1Minutes + Effort2Minutes) / 60 as float) +
(CAST((Effort1*60 + Effort2 * 60 + Effort1Minutes + Effort2Minutes) % 60 as float)) / 100
FROM MyTable
WHERE ...
See what I mean?
If you don't tell us what you want to start with, then you have to think about the answer we give rather than grab bits of it and hope! :laugh: