Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm using a load * but want to modify a few fields using drop field
Load
*,resident TableX;
Should drop field go after the resident TableX; line or before it?
Also, when I'm adding the modified field back in, is this a separate load statement?
This is my best guess at the moment, does it look close?
Load *,
resident TableX;
Drop Field FirstName;
Drop Field LastName;
FirstName & '_' & LastName AS FullName;
Thanks guys
By dropping fields this way you remove them completely from Qlikviews in-memory database. You can also drop them from only specific tables by adding From TableX, TableY. You can't use them anymore to create new fields. So create the new field first and drop the fields when you're really finished with them. Like this:
Load *, FirstName & '_' & LastName AS FullName;
resident TableX;
Drop Field FirstName;
Drop Field LastName;
ASD:
LOAD * INLINE [
A, B, C, D
1, 1, 1, 1
2, 2, 2, 2
3, 3, 3, 3
4, 4, 4, 4
5, 5, 5, 5
5, 5, 5, 5
];
LOAD *
Resident ASD;
DROP Field A,B,C;
to using Drop field syntax
Drop Field Fieldname;
hope it helps
By dropping fields this way you remove them completely from Qlikviews in-memory database. You can also drop them from only specific tables by adding From TableX, TableY. You can't use them anymore to create new fields. So create the new field first and drop the fields when you're really finished with them. Like this:
Load *, FirstName & '_' & LastName AS FullName;
resident TableX;
Drop Field FirstName;
Drop Field LastName;
Yes, I agree with Wassenaar, just wanted to add...you can drop all fields in single statement as well.
drop fields FirstName,LastName from TableX;
Best,
SKumar