Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
You can only store 1 table by QVD. You can either join your tables and the store it,or use CONCATENATE.
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.
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??
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.
I'm not sure what to tell you. This is no very logical,sorry.
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
I'm not able to see MrFreeze data with this code. Only Dosing data can able to see.
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