Question

I can COUNT text fields with the necessary changes to the below equation, but can neither COUNT nor SUM the number field.

size = number field

ExecuteSQL ( " SELECT SUM ( size ) FROM Albums" ; "" ; "" )

This calculation results in a ? in the data viewer.

Was it helpful?

Solution 2

SOLVED

I used SeedCode's SQLExplorer and came up with this.

ExecuteSQL ( "SELECT SUM (\"size\") FROM \"Albums\"" ; "" ; "" ; "")

Original calculation did not work because SIZE is a reserved word.

Oh, well. Thanks for everyone's input.

OTHER TIPS

Have you tried this :

ExecuteSQL ( " SELECT SUM ( size ) || '' FROM Albums" ; "" ; "" )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top