Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have an issue with tables concatenation. I have a list of .qvds that looks like next one:
Z1:
Load * Inline [
A, B, C
3, 4, 5
];
Store Z1 into '$(vTargetPath)'Z1.qvd];
Drop Table Z1;
Z2:
Load * Inline [
A, B, C, D
3, 7, 10, 12
];
Store Z2 into '$(vTargetPath)'Z2.qvd];
Drop Table Z2;
I take all tables using For - Next loop.
For Each File in Filelist('$(vTargetPath)Z*.qvd')
TMP:
Load *
From [$(File)](qvd);
Next File
And I need to have all the tables i load in one big TMP table. But instead of it I got TMP and TMP-1 tables for Z1 and Z2 qvds. How do I may concatenate tables with different amount of fields inside the loop?
concatenation is not automatic since you do not have the same columns.
but you can always do that trick
TMP:
load * inline [
TmpField
];
For Each File in Filelist('$(vTargetPath)Z*.qvd')
TMP:
concatenate(TMP)
Load *
From [$(File)](qvd);
Next File;
drop fields TmpField;
output :
concatenation is not automatic since you do not have the same columns.
but you can always do that trick
TMP:
load * inline [
TmpField
];
For Each File in Filelist('$(vTargetPath)Z*.qvd')
TMP:
concatenate(TMP)
Load *
From [$(File)](qvd);
Next File;
drop fields TmpField;
output :
@Taoufiq_Zarra Thank you very much for your help. This solution is perfect.
@Taoufiq_Zarra awesome, it is really helpful nd nice trick