William Fishburne
On Wed, 4 Jun 2003 11:17:31 -0400, PARLEY,THUNDER (HP-MountainView,ex1) <[EMAIL PROTECTED]> wrote:
The given SQL is not valid syntax for Oracle. DBD:Oracle is returning the correct error from the DB.
--Thunder
-----Original Message----- From: Dean Arnold [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:00 AM To: DBI-users Subject: DBIx::Chart & Oracle aggregate function
A DBIx::Chart user is experiencing problems with the following query:
$rsth = $dbh->prepare( "SELECT GRAINS,SUM(GRAINS) FROM SOMETABLE RETURNING linegraph(*), imagemap where width=500 and AND HEIGHT=500");
and the again the error:
DBD::Oracle::db prepare failed: ORA-00937: not a single-group group function (DBD ERROR:OCIStmtExecute/Describe) for statement "SELECT GRAINS,SUM(GRAINS) FROM SOMETABLE"
They claim that the error does not occur when the "RETURNING linegraph(*)..." clause is removed. Alas, I don't have an Oracle instance handy to test with, but was wondering if "SELECT X, SUM(X) FROM MYTABLE" was valid Oracle syntax without a GROUP BY clause ? Does that compute a cumulative sum in Oracle ?
Any insights much appreciated, Dean Arnold Presicient Corp.
