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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generate qvd for unreleated tables

Hello,


// ******************Dosing ***********

SUB Dosing(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

Max_Dosing:

LOAD  Dosing,MinDosing, MaxDosing, MinDosing as MinDosing1, MaxDosing as MaxDosing1;

LOAD

'$(Str)' as Dosing,

max($(Str)) as MaxDosing,

min($(Str)) as MinDosing

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

CALL Dosing('DoseCavityPZ');

CALL Dosing('DosePumpSpdS');

//***************MrFreeze************************

SUB MrFreeze(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

Max_MrFreeze:

LOAD  MrFreeze,MinMrFreeze, MaxMrFreeze, MinMrFreeze as MinMrFreeze1, MaxMrFreeze as MaxMrFreeze1;

LOAD

'$(Str)' as MrFreeze,

max($(Str)) as MaxMrFreeze,

min($(Str)) as MinMrFreeze

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

CALL MrFreeze('MrFrzBlowTimeS');

CALL MrFreeze('MrFrzCavityPZ');

- I want to combine dosing and MrFreeze tables into one qvd file. No matter of relationship for both tables data. Instead of generating two different qvd files i want to generate single qvd file without losing data.

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with the same table name for both the tables

Use this for freeze and check the data.

Max_Dosing:

LOAD 'Freeze' as TableName,MrFreeze as KeyValues,MinMrFreeze as MinValue, MaxMrFreeze as MaxValue, MinMrFreeze as MinValue1, MaxMrFreeze as MaxValue1;

LOAD

'$(Str)' as MrFreeze,

max($(Str)) as MaxMrFreeze,

min($(Str)) as MinMrFreeze

Resident All_$(Str);

DROP Table All_$(Str);

Celambarasan

View solution in original post

8 Replies
jvitantonio
Specialist III
Specialist III

You can only store 1 table by QVD. You can either join your tables and the store it,or use CONCATENATE.

Not applicable
Author

Yes u r right. But to join the tables there should be atleast one common field in both tables. here i don't have it.

jvitantonio
Specialist III
Specialist III

You can use concatenate then. But I don't think this is what you want... I don't recommend you mix to independent tables in 1 qvd, it has no sense and it's not a best practice. what's the problem of storing the 2 tables in 2 different qvd files??

Not applicable
Author

The Problem is i need to create 8 different qvd files as shown above two tables code. So i just want to reduce the qvd files.

jvitantonio
Specialist III
Specialist III

I'm not sure what to tell you. This is no very logical,sorry.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try this method

SUB Dosing(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

Max_Dosing:

LOAD  'Dosing' as TableName,Dosing as KeyValues,MinDosing as MinValue, MaxDosing as MaxValue, MinDosing as MinValue1, MaxDosing as MaxValue1;

LOAD

'$(Str)' as Dosing,

max($(Str)) as MaxDosing,

min($(Str)) as MinDosing

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

CALL Dosing('DoseCavityPZ');

CALL Dosing('DosePumpSpdS');

//***************MrFreeze************************

SUB MrFreeze(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

Concatenate

LOAD 'Freeze' as TableName,MrFreeze as KeyValues,MinMrFreeze as MinValue, MaxMrFreeze as MaxValue, MinMrFreeze as MinValue1, MaxMrFreeze as MaxValue1;

LOAD

'$(Str)' as MrFreeze,

max($(Str)) as MaxMrFreeze,

min($(Str)) as MinMrFreeze

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

CALL MrFreeze('MrFrzBlowTimeS');

CALL MrFreeze('MrFrzCavityPZ');

Celambarasan

Not applicable
Author

I'm not able to see MrFreeze data with this code. Only Dosing data can able to see.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with the same table name for both the tables

Use this for freeze and check the data.

Max_Dosing:

LOAD 'Freeze' as TableName,MrFreeze as KeyValues,MinMrFreeze as MinValue, MaxMrFreeze as MaxValue, MinMrFreeze as MinValue1, MaxMrFreeze as MaxValue1;

LOAD

'$(Str)' as MrFreeze,

max($(Str)) as MaxMrFreeze,

min($(Str)) as MinMrFreeze

Resident All_$(Str);

DROP Table All_$(Str);

Celambarasan