Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey!!
i am trying to implement incremental load i am having trouble using the where clause.
i have a primary key as ID and i want to enter more data but i want to exclude entering the same ID twice.
can anyone tell me how to use where clause?
Hi,
Actually what heppening is,
First Load will create a qvd of your table data.
After that in the second Load, the incremented data only will apend to the last created qvd.
Now we are again creating the qvd with the same name for the total data.It will override the existing qvd.
The same process will repeats in every reload.
For your question, You are loading the qvd only.So, not a problem and without reload you can't achieve it.
Hope it helps you..
where ID>max(ID)
or
where Exists(ID)
or
Create Var
let vMax=Max(ID);
then in where Clause ID>$(vMax)
hope this helps
Hi,
Use this script
//Main:
//LOAD * Inline [
//EmpID, EmpName, Sal
//1, A, 10000
//2, B, 20000
//3, C, 15000
//4, D, 18000
//5, E, 30000
//6, F, 25000
//];
//STORE Main into Main.qvd;
Main:
LOAD EmpID
FROM
(
Let vMaxID = Peek('EmpID',-1,Main);
Drop Table Main;
Main:
LOAD EmpID,
EmpName,
Sal
FROM
(
Concatenate
LOAD EmpID,
EmpName,
Sal
FROM
(
Where EmpID>$(vMaxID);
STORE Main into Main.qvd;
thank you Ravi Kumar
the script you suggested is giving me the required result but the thing is as the fields are same , qlikview is automatically concatenating both the tables. i wanted that when we store the result in main.qvd after that why do we have to reload it i just need to add more data to it. can we not just load the second file and store it in main.qvd??
is it posible??
Hi
//LOAD * Inline [
EmpID, EmpName, Sal
1, A, 10000
2, B, 20000
3, C, 15000
4, D, 18000
5, E, 30000
6, F, 25000
];
Concatenate
LOAD EmpID,
EmpName,
Sal
FROM
where not exist(ID)
//STORE Main into Main.qvd;
GOOD LUCK
Fernando
And also it should show the number of items added to the previous file.
Hi,
Actually what heppening is,
First Load will create a qvd of your table data.
After that in the second Load, the incremented data only will apend to the last created qvd.
Now we are again creating the qvd with the same name for the total data.It will override the existing qvd.
The same process will repeats in every reload.
For your question, You are loading the qvd only.So, not a problem and without reload you can't achieve it.
Hope it helps you..