2 Replies Latest reply on Mar 4, 2015 10:53 AM by Scripts

    ExecuteSQL Statement to Select Quantity Ordered

    BrianLoomis

      Title

      ExecuteSQL Statement to Select Quantity Ordered

      Post

      ExecuteSQL("Select sum(o.QuantityOrdered)
      From  ORDERLINE_fromOrderHeaderLineCreation o
      Join GENERALORDERHEADER g on (g.Id = o.FK_OrderId)
      Where (g.DateFinalized  ≤ ? and g.DateFinalized  ≥ ?)"; ""; ""; SYSVariables::EndDate; SYSVariables::StartDate)

      This is my SQL statement I am trying to execute to select the number of products purchased between two dates.  I am given the result "?".  Any idea as to what I messed up here?

      Thanks for the help!