m.mcdonell

SQL Help

Discussion created by m.mcdonell on Mar 4, 2014
Latest reply on Mar 4, 2014 by BruceHerbach

I have heavily modified the Invoice template that comes with Filemaker 13 Advanced and have a problem with the SQL scripts that open at the beginning. I do not know much about SQL and can likely figure it out with troubleshooting and hours and hours of time but am hoping someone can direct me in the right direction.

Here is the script that faults, it is a loop that doesn't stop. Any ideas what I should look for as to why the loop doesn't stop?

Thank you in advanceMachine generated alternative text: pt Name: Execute SQL I Top 5Customers t Set Variable SSQL RE SULT; Value:Le ([ year = Company Dashboard: :Current Year; dedmal = Left (Evaluate ( 1/2); 1); SQL = ExecuteSQL( SELECT a. Company, SuMb. lotalV) as InvoiceTotal FROM ‘CustomersV a ...] t If [SSQL_RESULT =01 t Halt Scipt t End If t Loop t Set Field [Company Dashboard: :Company for Customer Chart; List ( Company Dashboard: :Company for Customer Chart; ParseSQLQuery (SSQLflESULT; ValueCount (Company Dashboard: :Company for Customer Chart) + 1; 0; 1’; T) ... t Set Field [Company Dashboard: :Total for Customer Chart; List ( Company Dashboard: :Total for Customer Chart; ParseSQLQuery ( $SQL..RESULT; ValueCount (Company Dashboard: :Total for Customer Chart) + 1; 1; T; ¶))] t Exit Loop If [ValueCount (Company Dashboard: :Company for Customer Chart) = ValueCount ( SSQL_RESULT)] t End Loop

Outcomes