Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
julioarriaga
Contributor II

After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

Hi everyone,

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'?

Thanks.

Capture1.PNG

Tags (2)
1 Solution

Accepted Solutions

Re: After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

Yes, you can spell it either way and it works exactly the same.

-Rob

4 Replies

Re: After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

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.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Re: After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

You can write also in single statement which is fastest as ROB suggested

DROP FIELDS a,b,c;



julioarriaga
Contributor II

Re: After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

So basically it is the same with 'drop field' and 'drop fields' when you're dropping several fields?

Re: After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

Yes, you can spell it either way and it works exactly the same.

-Rob

Community Browser