Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

script error

Hi all,

I am doing loading and trying to generate QVD's based on some logic. But it is throwing error.

but site_visit_updated_datetime field is there.

Can anybody tell me what is reason.

10 Replies
swuehl
MVP
MVP

Seems you are using some variables that don't expand correctly.

They seem to be missing right from >= and <= operators.

Gysbert_Wassenaar

You're using variables that can't be resolved to a value. Make sure the variables you use actually have a value.


talk is cheap, supply exceeds demand
petter
Partner - Champion III
Partner - Champion III

If you show us the load script or the part that contains the LOAD statement together with the definition of the variable you are referring to in your WHERE clause - we could probably help out...

Colin-Albert

I would guess you are comparing the date to a variable and the variable is null.

Can you post your load statement?

HirisH_V7
Master
Master

Hi,

Where Num(Site_Visit_Updated_time) >= and  here ?

May be like this,   Num(Site_Visit_Updated_time) >= (Recno()=20)  ;


-Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Hi All,

Thanks to all for ur quick replies.

Let Vqvdpath = 'D:\QlikView\SourceDocuments\QVX\Mktg_Funnel_Reports\Retention\QVD Retention\';

Max_Date:

LOAD Max(Floor(Timestamp#(site_visit_updated_datetime, 'DD/MM/YYYY hh:mm:ss.fff'))) as MaxMonth FROM

$(Vqvdpath)fact_site_visit.QVD (qvd) ;

LET vMaxMonth = num(AddMonths(Peek('MaxMonth'), -1));

LET vMinMonth = num(AddMonths(Peek('MaxMonth'), -13));

Drop Table Max_Date;

   Visits13:

   LOAD * FROM

  

   $(Vqvdpath)fact_site_visit.QVD (qvd)

   Where Num(site_visit_updated_datetime) >= $(vMaxMonth) and Num(site_visit_updated_datetime) <=$(vMinMonth);

    If FileSize('$(Vqvdpath)fact_site_visit.qvd') > 0 then

    Concatenate(Visits13)

    LOAD *

   

    FROM $(Vqvdpath)fact_site_visit.QVD(qvd)

    

    Where Num(site_visit_updated_datetime) >= $(vMaxMonth) and Num(site_visit_updated_datetime) <=$(vMinMonth);

   

    ENDIF

  

    Store Visits13 into fact_site_visit.QVD (qvd);

Anonymous
Not applicable
Author

I  think,

It is because not exist condition, the order of the operators is incorrect, you used the same fields in twice cases.

Example:

Where Num(site_visit_updated_datetime) >= 10  and Num(site_visit_updated_datetime) <= 20

Regards.

swuehl
MVP
MVP

Have you checked the value of MaxMonth in the table and the created variables? What do these three values show?

Colin-Albert

Try adding quotes around your variables also check that the variables actually contain the correct data.

Where Num(site_visit_updated_datetime) >= '$(vMaxMonth)' and Num(site_visit_updated_datetime) <='$(vMinMonth)';