Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Needed help urgently :
I am implementing incremental load based on Flag 'Full_Load_Flag' (Y/N)
This Flag is in the same table from where data is coming.
So I want to know the Qlikview script for the following:
table1:
load
if (Full_Load_Flag = 'Y',
Load * from xyz;
store table1 into history.qvd
else
load * from xyz where month_key='Sep'
store table1 into current.qvd;
Thanks In advance!
Reagrds,
Gargi
Gargi
How about this
table1:
LOAD *
From xyz
Where Full_Load_Flag='Y';
If Alt(NoOfRows('table1'), 0) > 0 Then
STORE table1 into history.qvd;
Else
table1:
LOAD *
From xyz
Where month_key='Sep';
STORE table1 into current.qvd;
End If
This will run the second load only if no data was returned from the first.
Hope that helps
Jonathan
Hi Gargi.
I think you can do the following:
table1:
LOAD *
From xyz
Where Full_Load_Flag='Y';
STORE * from table1 into history.qvd;
DROP Table table1;
table1:
LOAD *
From xyz
Where month_key='Sep'
and Full_Load_Flag='N';
STORE * from table1 into current.qvd;
I hope it helps.
Regards.
Éric Cosmai
Hi Éric,
Thanks for you solution , but I want either of it to be saved based on condition. not both to be saved on daily basis.
Regards,
Gargi
Gargi
How about this
table1:
LOAD *
From xyz
Where Full_Load_Flag='Y';
If Alt(NoOfRows('table1'), 0) > 0 Then
STORE table1 into history.qvd;
Else
table1:
LOAD *
From xyz
Where month_key='Sep';
STORE table1 into current.qvd;
End If
This will run the second load only if no data was returned from the first.
Hope that helps
Jonathan
Thanks Jonathan,
It worked..!!
Reagdrs,
Gargi