3 Replies Latest reply on Jan 16, 2016 10:35 AM by jbrown

    Execute SQL comparing dates


      Hi I am writing this ExecuteSQL() command but it somehow doesn't work


      ExecuteSQL (



      SELECT SUM(a.Plan_SoupToDeliver)

      FROM Proc_BatchLine a INNER JOIN Proc_Batch b

      ON a.fk_DeliveryBatch = b.pk_DeliveryBatch

      WHERE b.Date = ?



      ; "" ; "" ; _HOME::TargetBatchDate



      _HOME::TargetBatchDate is a date field


      I tried removing the WHERE and it will work perfectly fine.

      Is it something to do with FileMaker not being able to compare date field with SQL format?


      Thanks in advance