Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sivaboggarapu20
Partner - Creator
Partner - Creator

The following error occurred: Unexpected token: '=', expected one of: '

Hi Team,

I am running the below script. But, I am getting below error. Could some one help me on the below error code?

AWSDetaiQVD:

LOAD

    InvoiceID,

    PayerAccountId,

    LinkedAccountId,

    LinkedAccountName,

    ProductCode,

    RecordType,

    RecordId,

    ProductName,

    RateId,

    UsageType,

    Operation,

    AvailabilityZone,

    ItemDescription,

    UsageStartDate,

    UsageEndDate,

    UsageQuantity,

    BlendedRate,

    BlendedCost

FROM [lib://QVD/AWSDetail.qvd](qvd)

where Exists(InvoiceID);

Let vExists=Peek(InvoiceID,$(vNoRows)+1,'Billing');

Let vExistsLen=Len(trim(Peek(InvoiceID,$(vNoRows)+1,'Billing')));

if $(vExists)=NULL() or  $(vExistsLen)<0 THEN

drop table Billing;

The following error occurred:

Unexpected token: '=', expected one of: '(', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', 'LITERAL_NUMBER', ...

---

The error occurred here:

if >>>>>>=<<<<<<NULL() or 0<0 THEN


1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

Hi,

Try :

if vExists=NULL() or  $(vExistsLen)<0 THEN

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

4 Replies
christophebrault
Specialist
Specialist

Hi,

Try :

if vExists=NULL() or  $(vExistsLen)<0 THEN

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
sivaboggarapu20
Partner - Creator
Partner - Creator
Author

Hi Brault,

Its working fine but I I would like to know what is the issue with above code?

Please explain me

Thanks,

Siva

christophebrault
Specialist
Specialist

I just figure out that you have to write vExistsLen as well after the or.

I can't technically explain you the "why". But from my experience, variables outside LOAD statement or functions should be used without the $()

hic‌ could have an explanation ?

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
sivaboggarapu20
Partner - Creator
Partner - Creator
Author

Thank you Brault