I want to receive some calculated fields in a SELECT statement, of which
some are made with results of previous calculations, like:
if(invoice1<>"", invoiceamount1, 0)+
if(invoice2<>"", invoiceamount2, 0)
Where invoice1 and invoice2 are text fields and invoiceamount1 and
invoiceamount2 are numerical fields.
I know this doesn't work, but is there a way to do this? It has to work
in one query, to simplify the rest of the implementation.
The only option I can think of is repeating the if() statements.