AnsweredAssumed Answered

Simple executesql sum

Question asked by forestheath on Jul 30, 2018
Latest reply on Aug 1, 2018 by forestheath


Hello, I want to do a summary based on a simple condition, summarizing a field based on another field's input. It is a very simple database with less than 100 records.

 

This works OK;

 

ExecuteSQL ( "SELECT SUM (\"Current Value\")

FROM \"Investments\"" ; "" ; "" ; "")

 

 

how can I use a WHEN condition? This returns "specified field cannot be found". The strategy would be 'For TV' or 'Bonds'.

 

ExecuteSQL ( "SELECT SUM (\"Current Value\")

FROM \"Investments\

WHERE \"Strategy\" = "For TV"

 

 

"" ; "" ; "" ; "")

Outcomes