Two tables:
Cust: ID, State
Order: ID, Type, Amt
I'm tying to get the sum of Amt when TYPE="Fin" and State="WA"
Here's what I've tried:
SQL := 'SELECT *, TOTAL(Order.Amt) AS SC '
+ ' FROM Order INNER JOIN Cust ON Order.ID=Cust.ID'
+ ' WHERE Order.Type="Fin" AND Cust.State ="WA"';
tot := sltb.FieldIndex['SC'];
Tot always comes up with the number of records in the CUST file?
Please help me figure this out.