Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sivaboggarapu20
New Contributor III

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
Valued Contributor

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

Hi,

Try :

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

4 Replies
christophebrault
Valued Contributor

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

Hi,

Try :

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

sivaboggarapu20
New Contributor III

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

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
Valued Contributor

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

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 ?

sivaboggarapu20
New Contributor III

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

Thank you Brault

Community Browser