4 Replies Latest reply: Feb 25, 2016 11:14 AM by Sunny Talwar RSS

    Load where Exists (iseries(

    Claudio Degli Antoni

       

       

      Hi all,

       

       

      This works well

       

        

      H_Order:

      LOAD *, (OTAAOR & OTNUOR) AS KeyOrd;
      SELECT *
      FROM   HORDER;
      L_Order:
      LOAD *,
      (ORAAOR & ORNUOR) AS KeyOrd         
      WHERE EXISTS (OTNUOR, ORNUOR) ;
      SQL SELECT *
      FROM   LORDER;

       

       

      This one causes an error on EXIST istruction

       

       

      H_Order:
      LOAD *, (OTAAOR & OTNUOR) AS KeyOrd;
      SELECT *
      FROM   HORDER;

      L_Order:
      LOAD *,
      (ORAAOR & ORNUOR) AS KeyOrd;
      SQL SELECT *
      FROM   LORDER
      WHERE EXISTS (OTNUOR, ORNUOR);

       

       

      I have to use exist only after LOAD STATEMENTS ?

       

       

      Many thanks in advance