Icon View Incident Report

Minor Minor
Reported By: Christian Sanggaard
Reported On: 11/2/2005
For: Version 4.21 Build 11
# 2131 Cannot Use the ROUND() Function Outside of a SUM() Aggregate Function in an INSERT Statement

The parser doesn't allow me to put ROUND outside of the SUM, in an update statement.

INSERT INTO buffer2
(ACCID,PaymentNo,GLAccNo,Text,Amount)
SELECT ACCID,999999992,'Test','Test',round(SUM(-Amount),2) AS test
FROM buffer2
GROUP BY ACCID



Comments Comments and Workarounds
The workaround is to use a temporary table (SELECT..INTO) for the initial grouped query without the ROUND(), and then use this table for the INSERT statement.


Resolution Resolution
Fixed Problem on 11/6/2005 in version 4.22 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image