Interesting. I whipped up this test and cannot replicate the problem: CREATE CURSOR crsTest (id i) cCmd = [CALCULATE ] FOR x = 1 TO 32 cField = "Field"+TRANSFORM(x) ALTER table crsTest ADD COLUMN (cField) I cCmd = cCmd + "SUM("+cField+")," NEXT cCmd = cCmd + "AVG(Field1)" &cCmd
On Thu, Nov 21, 2019 at 9:50 AM Paul Newton Paul.Newton@pegasus.co.uk wrote:
Hi all
I think I have come across a possibly undocumented limitation to the maximum number of expressions in a CALCULATE command. In my case a fatal error occurred when trying to CALCULATE the SUMs of 32 different fields in a cursor. It took a while to establish what was going on, but when I reduced the number of expressions to 31 the error no longer occurred.
Has anybody else encountered this issue? Many thanks
Paul Newton
[excessive quoting removed by server]