Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Appending data to qvd from multiple appications

Hi all,

I am taking only one record from two applications(A.qvw and B.qvw) respectively.

Count(ID) From A.qvw is 100

Count(ID) From B.qvw is 200.

Now I want to store into a common qvd.

If I do refresh applications qvd has only one record i.e. 100 or 200

But I want 2 records in same qvd.

Please help me out on this

Regards

Prasanth

5 Replies
shiveshsingh
Master
Master

use this

A:load count(id) from A.qvd;

concatenate(A)

load count(id) from B.qvd;

store A into Common.qvd(QVD)

pradosh_thakur
Master II
Master II

Hi Prasanth

Please let me know if it works and in which case you are going to use it.

I am assuming the  you just want to get count(id) from both A.qvw and B.qvw and save it in some A_B.qvd. three of them are in same location. if not you need to tweak your code a little to point to your exact file location

so code will be something like this

code for B_QVW........

B:
LOAD * INLINE [
ID
1
2
3
4
5
6
7
8
];
B_1:
LOAD Count(ID) AS ID_COUNT,'B' AS FLAG
Resident B;
Directory;
LET vListqvdexists=isnull(QvdCreateTime('A_B.QVD'));
if($(vListqvdexists)=0) then
LOAD ID_COUNT,FLAG
FROM  A_B.qvd(qvd)
WHERE FLAG='A';

end if;
store B_1 into A_B.QVD(qvd);

CODE FOR A_QVW........

A:
LOAD * INLINE [
ID
1
2
3
4
5
6
7
8
9
];
A_1:
LOAD Count(ID) AS ID_COUNT,'A' AS FLAG
Resident A;

Directory;
LET vListqvdexists=isnull(QvdCreateTime('A_B.QVD'));
if($(vListqvdexists)=0) then
LOAD ID_COUNT,FLAG
FROM  A_B.qvd(qvd)
WHERE FLAG='B';

end if;

STORE A_1 into A_B.QVD(qvd)

Let me know if you need the file as well.

regards

Pradosh

Learning never stops.
venkey2847
Contributor II
Contributor II

Hi,

Thanks for your response...

Actually it is sample Qlikview application for 2 QVWs but we have 100 applications where we need to apply same logic.

If we take flag it won't work I guess correct me if I am wrong.

Regards

Prasanth.

pradosh_thakur
Master II
Master II

Hi Prasanth

You are logged in from different Account my friend.

Coming back to your question Flag is the reason this is working . It will let you identify the count is from which App and update it's count  when it changes after next reload. It is needed for you to identify the application name. you can rename 'A'/'B' as the app name .

Try changing the inline field count to 10 or 15 . You will see it will update the record. If you don't want update and just append one top of other you wont need any flags. I hope i made it clear why i have used flags here.

Learning never stops.
Anil_Babu_Samineni

Instead create 2 Qvd's from 2 QVw's then load them and do concatenate.

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)