SqlDbx
You are not logged in.
Pages: 1
I need to know how to write a query that will show the sum of data for each hour. I thought I found what I was looking for in this query:
SELECT CONVERT(VARCHAR(10),CallStartDt,120) AS date
,DatePart(hh,CallStartDt) as Hour
FROM AODCallDetail
GROUP BY CONVERT(VARCHAR(10),CallStartDt,120),DatePart(hh,CallStartDt)
But I'm getting an error that says "120 is not a valid style number when converting from DATETIME to a character string."
Thanks
It seems to me that Sybase does not like 120 as a style in convert function.
Otherwise your query looks right
Offline
Is there another style I can use then? What would I have to do to get it to run?
Pages: 1