Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Garbage after statement

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

1 Solution

Accepted Solutions
MVP
MVP

Re: Garbage after statement

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

DROP Table Returns_tmp;

10 Replies
sureshqv
Esteemed Contributor III

Re: Garbage after statement

chk ur field names wit ur DB team..

Not applicable

Re: Garbage after statement

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,

Not applicable

Re: Garbage after statement

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,

MVP
MVP

Re: Garbage after statement

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;

manojkulkarni
Valued Contributor II

Re: Garbage after statement

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

Not applicable

Re: Garbage after statement

wow! that is it!! what was the problem?

MVP
MVP

Re: Garbage after statement

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

DROP Table Returns_tmp;

Not applicable

Re: Garbage after statement

mAX GRO THANK YOU VERY MUCH!

small qusetion:  can i write in qliksense BETWEEN

that way i will see only specific months?

Not applicable

Re: Garbage after statement

i know that in qlikview that is no such option