Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

qualify and unqualify

please explain the qulify and unqualify

reddy

10 Replies
Not applicable

qualify and unqualify

Refer to page No. 323 and 340 of Qlikview reference manual.

Not applicable

qualify and unqualify

Hi,

    

     Qualify statements renames all the fields with the table name prefix which are mentioned in the statement.

     QUALIFY *; it can be used above the table name. * is to rename all the field name in the table.

     Otherwise u can also specify each field that u wanted to rename.

     UNQUALIFY is reverse process of QUALIFY statement.

     If u r not using the UNQUALIFY statement after using QUALIFY, it ll rename all fields of all the table below the QUALIFY.

     QUALIFY *; //or QUALIFY OrderID, CustomerName;

     Orders:     //Table Name

     LOAD OrderID,

               OrderName,

               CustomerName,

     FROM xxx.xls;

     UNQUALIFY *;

     If u use * then, ur fields ll be like this: Orders.OrderID

                                                            Orders.OrderName

                                                            Orders.CustomerName

     If not using *, it ll rename oly the fields u have mentioned.

     Hope this helps u.

davidwhite
New Contributor II

Re: qualify and unqualify

Here's a good way to use QUALIFY and UNQUALIFY to bring in new tables and you want to link on one known field, but you aren't sure whether you will have name clashes with the rest.

QUALIFY *;

UNQUALIFY OrderID;

Orders:    

     LOAD OrderID,

               OrderName,

               CustomerName,

     FROM xxx.xls;

UNQUALIFY *;

This will result in a table with fields like this:

     OrderID

     Orders.OrderName

     Orders.CustomerName

Not applicable

Re: qualify and unqualify

vey good post. Thank you for give a very clear sample .

Not applicable

Re: qualify and unqualify

Please refer the attached application

datanibbler
Esteemed Contributor

Re: qualify and unqualify

Hi,

just to add a little bit out of my own experience:

=> You have to be really careful about those commands: When you have INCREMENTAL LOADs anywhere, for example, putting those commands in the wrong place can have you facing ever-increasing field_names getting longer with every reload

>>>  (like [table].[table].[table].[field] etc.) <<<

So it's better to sit back and spend some time thinking what you have (base_data), what you want and what will be the effect of putting those commands in a specific place - and check the outcome right away.

Best regards,

DataNibbler

Not applicable

Re: qualify and unqualify

Nice and helpful post

Highlighted
Not applicable

Re: qualify and unqualify

Hi,

What's the difference between your script and the below one? I did not write UNQUALIFY * at the end.

QUALIFY *;

UNQUALIFY OrderID;

Orders:   

     LOAD OrderID,

               OrderName,

               CustomerName,

     FROM xxx.xls;

Not applicable

Re: qualify and unqualify

I got it while I was practicing.

UNQUALIFY * is needed at the end of load script, otherwise QUALIFY * is getting applied to script in next tabs as well