Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ASK.. how to use WHERE in load script??

hello all, need your help pliss..

i have a little problem here,

this is my load script,

load

NoRek as NoRek_CAD,

NoPin as NoPin_CAD,

min(date(CicilDate)) as MinCicilDate,

num(interval(today() - min(Date(CicilDate)))) as AgingDay,

from

(qvd) group by NoRek, NoPin;

this is my SQL Picture,

error loading image

you can see from the script and picture above,

the result of MinCicilDate is 2009-08-05.

but what i want is 2010-05-05. because Paidstatus = 0, Which mean customer haven't paid in that period.

i must get min(cicildate) where paidstatus = 0 to calculate AgingDay.

note, cicildate same as duedate.

the problem is how to use WHERE is my script,

min(date(CicilDate)) where PaidSts = 0 As MinCicilDay,

because the real agingday is (today - MinCicilDay where PaidSts = 0)

What is the syntax of WHERE?

plis complete my syntax above .

plis help..

thank you very muchh..

regards !!




Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,


after taking a quick look at your post...

is 'PaidSts' in your CorAccountDetail.qvd?

If so, you should be able to load with
===========================================

load

NoRek as NoRek_CAD,

NoPin as NoPin_CAD,

min(date(CicilDate)) as MinCicilDate,

num(interval(today() - min(Date(CicilDate)))) as AgingDay,

from

(qvd)

where PaidSts=0

group by NoRek, NoPin;

==============================================

Hope this helps. If not provide more information!

Regards

Martin

View solution in original post

2 Replies
Not applicable
Author

Hi,


after taking a quick look at your post...

is 'PaidSts' in your CorAccountDetail.qvd?

If so, you should be able to load with
===========================================

load

NoRek as NoRek_CAD,

NoPin as NoPin_CAD,

min(date(CicilDate)) as MinCicilDate,

num(interval(today() - min(Date(CicilDate)))) as AgingDay,

from

(qvd)

where PaidSts=0

group by NoRek, NoPin;

==============================================

Hope this helps. If not provide more information!

Regards

Martin

Not applicable
Author

wow.. it's work martin

thank you so muchh

have a nice day,

regards!!