SELECT name, datediff("s", start_time, stop_time) /3600, count(name)
FROM usertime group by name
Count is an aggregate function that only returns one value. Try removing it and let us know what happens.
If it still has problems, try putting "as TotalTime" after the datediff call. I know that in QBE view, if you omit an Alias it supplies 'Expr1' as your alias. I'm not sure about running it in code.
John
Use what you have,
Learn what you can,
Create what you need.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.