AnsweredAssumed Answered

ExecuteSQL function not working (simple query)

Question asked by user28222 on Oct 7, 2017
Latest reply on Oct 8, 2017 by user28222

Hi all,


I have a SQL head-scratcher:


SELECT invoice_id, customer_name, invoice_date, item, unit_price, qty

FROM invoices a, invoice_lines b, customers c

WHERE c.special_customer='YES'

AND a.invoice_date between ? and ?

AND a.pk_invoice_id=b.fk_invoice_id

AND c.pk_customer_id=a.fk_customer_id

AND b.qty>10



The query runs well most of the times, but occasionally produces blank output.


Assuming there are always records that satisfy the matching criteria, does anyone have any ideas on why the above would result in blanks?  Anything quirky about the way I wrote the sql code that Filemaker doesn't like?


Some of the fields are indexed for performant reasons, but I don't think that is why I would have this problem.


Always Grateful,