SELECT (SUM(Hours)/EstimatedHours) AS Progress
FROM Production.Time Log, Config.ProjectC onfig
WHERE Production.Time Log.ProjectConf igID = 1
I'm trying to calculate the progress of a task by adding all the hours from the timelog records and dividing it by the estimated time stored in the config table?
I wrote the procedure above but I keep getting the following error:
'Column 'Config.Project Config.Estimate dHours' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.'
what am I missing?
FROM Production.Time Log, Config.ProjectC onfig
WHERE Production.Time Log.ProjectConf igID = 1
I'm trying to calculate the progress of a task by adding all the hours from the timelog records and dividing it by the estimated time stored in the config table?
I wrote the procedure above but I keep getting the following error:
'Column 'Config.Project Config.Estimate dHours' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.'
what am I missing?
Comment