10 Replies Latest reply: Dec 9, 2015 1:35 PM by Massimo Grossi RSS

    Garbage after statement

    jhonatan ben ami

      Hey everyone  i am getting the following error:

      i tried to find the reason but could not find the problem

      Garbage after statement: Returns: Load TRANS_TYPE, TRANS_CURDATE, (if(TRANS_TYPE='X',TRANS_IVCUST,TRANS_CUST))AS TRANS_CUST, TRANS_BRANCH, TRANS_DOCNO, TRANS_IVNUM, (if(TRANS_TYPE='X',TRANS_IVAGENT,TRANS_DOCAGENT)) AS TRANS_AGENT, TRANS_PART, TRANS_IVCOST, TRANS_IVIEXCHANGE, TRANS_IVPRICE , TRANS_TQUANT, TRANS_IVTQUANT, IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 * (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100) AS NIS_TRANS_TOTPRICE, IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 * (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100) / (IF(CURREG_EXCHANGE2 > 0 ,CURREG_EXCHANGE2 , CUR_EXCHANGE2) ) AS DOLLAR_TRANS_TOTPRICE, IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 * (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100) / (IF(CURREG_EXCHANGE3 > 0 ,CURREG_EXCHANGE3 , CUR_EXCHANGE3) ) AS CURRENCY_TRANS_TOTPRICE, (if(TRANS_TYPE='X',TRANS_IVCUST,TRANS_CUST))& '_' & (if(TRANS_TYPE='X',TRANS_IVAGENT,TRANS_DOCAGENT))& '_' & TRANS_BRANCH&'_' & TRANS_PART & '_'& TRANS_CURDATE AS SALES_KEY Resident Returns_tmp Where TRANS_CURDATE >= '01/01/2010' DROP Table Returns_tmp

        • Re: Garbage after statement
          Chanty 4u

          chk ur field names wit ur DB team..

            • Re: Garbage after statement
              jhonatan ben ami

              o.k i tried using the d - bugging and got this:

               

               

              IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

               

               

              (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

              TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

              AS NIS_TRANS_TOTPRICE,

               

              // // //מחיר בדולרים משורת תעודה     

              IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

              (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

              TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

              // /

              (IF(CURREG_EXCHANGE2  > 0 ,CURREG_EXCHANGE2 , CUR_EXCHANGE2) )

              AS DOLLAR_TRANS_TOTPRICE,

               

              // //מחיר במטבע שלישי משורת התעודה

               

               

              IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

              (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

              TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

              /

              (IF(CURREG_EXCHANGE3  > 0 ,CURREG_EXCHANGE3 , CUR_EXCHANGE3) )

              AS CURRENCY_TRANS_TOTPRICE,

                • Re: Garbage after statement
                  jhonatan ben ami

                  i meant that i  see the problems are here:

                  IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

                   

                   

                  (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

                  TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

                  AS NIS_TRANS_TOTPRICE,

                   

                  // // //מחיר בדולרים משורת תעודה     

                  IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

                  (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

                  TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

                  // /

                  (IF(CURREG_EXCHANGE2  > 0 ,CURREG_EXCHANGE2 , CUR_EXCHANGE2) )

                  AS DOLLAR_TRANS_TOTPRICE,

                   

                  // //מחיר במטבע שלישי משורת התעודה

                   

                   

                  IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE,

                  (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *  (IF (TRANS_TYPE='N',(-1),1)) *

                  TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

                  /

                  (IF(CURREG_EXCHANGE3  > 0 ,CURREG_EXCHANGE3 , CUR_EXCHANGE3) )

                  AS CURRENCY_TRANS_TOTPRICE,

              • Re: Garbage after statement
                Massimo Grossi

                this works without error

                 

                Load TRANS_TYPE, TRANS_CURDATE,

                (if(TRANS_TYPE='X',TRANS_IVCUST,TRANS_CUST)) AS TRANS_CUST,

                TRANS_BRANCH, TRANS_DOCNO, TRANS_IVNUM,

                (if(TRANS_TYPE='X',TRANS_IVAGENT,TRANS_DOCAGENT)) AS TRANS_AGENT,

                TRANS_PART, TRANS_IVCOST, TRANS_IVIEXCHANGE, TRANS_IVPRICE , TRANS_TQUANT, TRANS_IVTQUANT,

                IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *

                  (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100) AS NIS_TRANS_TOTPRICE,

                IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *

                  (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

                  / (IF(CURREG_EXCHANGE2 > 0 ,CURREG_EXCHANGE2 , CUR_EXCHANGE2) ) AS DOLLAR_TRANS_TOTPRICE,

                IF(TRANS_TYPE= 'X',NIS_TRANS_IVPRICE, (TRANS_PRICE * TRANS_TQUANT) * (100 - TRANS_PERCENT)/100 *

                  (IF (TRANS_TYPE='N',(-1),1)) * TRANS_IEXCHANGE * (100 - TRANS_DOCPERCENT)/100)

                  / (IF(CURREG_EXCHANGE3 > 0 ,CURREG_EXCHANGE3 , CUR_EXCHANGE3) ) AS CURRENCY_TRANS_TOTPRICE,

                (if(TRANS_TYPE='X',TRANS_IVCUST,TRANS_CUST))& '_' & (if(TRANS_TYPE='X',TRANS_IVAGENT,TRANS_DOCAGENT))& '_'

                  & TRANS_BRANCH&'_' & TRANS_PART & '_'& TRANS_CURDATE AS SALES_KEY

                Resident Returns_tmp Where TRANS_CURDATE >= '01/01/2010' ;

                 

                DROP Table Returns_tmp;

                • Re: Garbage after statement
                  Manoj Kulkarni

                  i think semicolon is missing in last line before drop table statement.