on the stackoverflow site in fount Thad select CONVERT(CHAR(10), DATEADD(second, MAX(60), 0), 108)
will result in 00:01:00 (that's true btw :-) )
now I want to integrate this in the following query (for Ssms12):
SELECT Run.TaskName,history.runtime
,CONVERT(CHAR(10), DATEADD(second, MAX(history.runtime), 0), 108)
FROM dbo.history
INNER JOIN Run
ON dbo.history.TaskID=Run.TaskID
whatever I try, I can't get this to work in the above example, does anyone have an idea how to fix this?
error: Column 'Run.TaskName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.