6 Replies Latest reply: Nov 29, 2016 9:00 AM by Eduardo DImperio RSS

    LEFT JOIN USING WHILE

    Eduardo DImperio

      Hi,

       

      I'm trying this, but with no sucess. Please i need some help.

       

      ANALISE_TMP:

      LOAD

        ID_LEITURA,

          NAME_SYSTEM,

          NAME_GROUP,

          NEIGHB_SYSTEM,

          CITY_SYSTEM,

          OID_METER,

          NAME_TYPE_METER,

          TYPE_CONSTANT,

          NAME_UC,

          ADDRESS_BLOCK_UC,

          DATE_READ

        RESIDENT TMP2;

       

      Set dia=0

      Do while dia<=2   

         

      left join (ANALISE_TMP)

       

      LOAD

          OID_METER,

          VALUE_READ * TYPE_CONSTANT AS CONSUMODIA$dia

      RESIDENT TMP2

      where FLOOR(DATE_READ)=FLOOR(TODAY()-$dia);

      Let dia=dia+1;

      LooP

       

      //Ocorreram os seguintes erros:

       

      //Script line error:: return

       

       

      ---

       

       

      //O erro ocorreu aqui:

       

       

      //LooP