Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group By Hour Query Error

Status
Not open for further replies.

sjgbrown

Programmer
Nov 12, 2002
1
US
I've got an integer column that contains Seconds Since Midnight and I'd like to group it by hour. This is the query:

SELECT
Floor(XALOADS.ProTime/3600),
COUNT(XALOADS.LoadID)
FROM PUB.XALOADS
WHERE XALOADS.ProDate = sysdate
AND XALOADS.LoadStatus ='P'
GROUP BY Floor(XALOADS.ProTime/3600)

I'm getting the following error when it runs:

=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

Any ideas what's wrong?

TIA,

Sean Brown
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top