6 Replies Latest reply: Feb 18, 2016 7:32 AM by Kaushik Solanki RSS

    If statement across two tables and using MIN /MAX function

    Joanna Seldon

      Hi

       

      I have two sql tables, in which I am using

       

      Orders:

       

      Order_DateCheck

       

      left join

       

      Shipping:

       

      Shipping_DateCheck

       

      I am then trying to create a IF statement across the two SQL tables as a  flag to see if Max Shipping_DateCheck, is more than Order_DateCheck

       

      load *,

      if(max("Order_DateCheck")>("Shipping_DateCheck"),1,0) AS CustomerFlag

      resident Orders;

       

      keep getting error

       

      Where am I going wrong?

       

      Please help