Jump to content

This topic is 3427 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to sum a set of related records that only contain a specific value:

ExecuteSQL (
"SELECT
  
SUM (Subtotal)
FROM
  LineItems
WHERE
  
id = InvoiceID AND
  
sFlag = 1"
; "" ; "" )

but I'm getting a null result.

The Subtotal field is a calculated field.

Ideas?

Posted

Try

ExecuteSQL ( "
  SELECT SUM (Subtotal)
  FROM LineItems 
  WHERE id = ? AND sFlag = 1
  " ; "" ; "" ; InvoiceID
)

  • Like 2

This topic is 3427 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.