Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
deep2021
Creator III
Creator III

Qs error- unexcepted Token issue

Hi All,

 

I am getting an error as per the below,

 

The following error occurred:
Unexpected token: '12', expected one of: ',', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...
The error occurred here:
MaxLoop:
LOAD ACCT_SYSTEM_PORTF_NO_PERF,
6/28/2013 >>>>>>12<<<<<<:00:00 AM as ANALYSIS_DATE,
BUSINESS_DATE_PERF,
max([Comp PF Return]) as MaxCompPF,
max([Comp BM Return]) as MaxCompBM,
max([Comp Active Return]) as MaxCompAct
Resident PERF_TEMP Where ANALYSIS_DATE<=6/28/2013 12:00:00 AM and BUSINESS_DATE_PERF='8/31/2020 12:00:00 AM' Group By ACCT_SYSTEM_PORTF_NO_PERF,BUSINESS_DATE_PERF
Data has not been loaded. Please correct the error and try loading again.

 

Below is the script for the same.

 

 

Loop1:
LOAD Distinct
//ACCT_SYSTEM_PORTF_NO_PERF as PortLoop,
ANALYSIS_DATE as AnLoop,
BUSINESS_DATE_PERF as BDLoop

Resident PERF_TEMP Order By BUSINESS_DATE_PERF,ANALYSIS_DATE; // MonthNo>='$(vMaxMonth60)' and ACCT_SYSTEM_PORTF_NO_PERF,

let numRow= NoOfRows('Loop1');


sub Loop2


FOR i=0 to ('$(numRow)'-1);


//let vPort=peek('PortLoop',$(i),'Loop1');
let vBD=peek('BDLoop',$(i),'Loop1');
let vAD=peek('AnLoop',$(i),'Loop1');


if len('$(vAD)')=0 then
EXIT Sub;

ELSE
//
MaxLoop:
LOAD ACCT_SYSTEM_PORTF_NO_PERF,
$(vAD) as ANALYSIS_DATE,
BUSINESS_DATE_PERF,
max([Comp PF Return]) as MaxCompPF,
max([Comp BM Return]) as MaxCompBM,
max([Comp Active Return]) as MaxCompAct
Resident PERF_TEMP
Where ANALYSIS_DATE<=$(vAD) and BUSINESS_DATE_PERF='$(vBD)' Group By ACCT_SYSTEM_PORTF_NO_PERF,BUSINESS_DATE_PERF; //and ACCT_SYSTEM_PORTF_NO_PERF='$(vPort)'

 

Could you please suggest me on this.

 

 

Labels (3)
1 Reply
Digvijay_Singh

Looks like you need enclose $(vAD) in single quote like this - '$(vAD)' 

at all the places wherever it is used.