Discussion Board for collaboration on QlikView Scripting.
I did a test and I stumbled upon that drop field can also drop several fields. So my question is, what is really the difference between the 'drop field' and 'drop fields'?
Go to Solution.
Yes, you can spell it either way and it works exactly the same.
You may spell it "field" or "fields" whether dropping one or many fields.
If you are dropping multiple fields, there is a significant performance difference between using one DROP statement vs multiple DROP statements that drop one field each.
DROP FIELD a,b,c;
is faster than
DROP FIELD a;
DROP FIELD b;
DROP FIELD c;
The reason is that QV rewrites the records array after every DROP statement, which can take a few seconds in a large table. This may be less of an issue in QV12, haven't benchmarked it.
You can write also in single statement which is fastest as ROB suggested
DROP FIELDS a,b,c;
So basically it is the same with 'drop field' and 'drop fields' when you're dropping several fields?