Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table in name in fields

Basically I know there is a way in qlik to make the table name part of the file name.  I think you just need to type in a command to switch it on/off.

For example

Pick:

select * from pickmovements

Would create a table in Qlik with the names

Pick.Location

Pick.StockItem

etc

Thanks

Andy

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You need the Qualify command, here is the Help for it :

Qualify

The Qualify statement is used for switching on the qualification of field names, i.e. field names will get the table name as a prefix.

The automatic association of fields with the same name in different tables can be suspended by means of the qualify statement, which qualifies the field name with its table name. If qualified, the field name(s) will be renamed when found in a table. The new name will be in the form of tablename.fieldname. Tablename is equivalent to the label of the current table, or, if no label exists, to the name appearing after from in load and select statements.

The qualification will be made for all fields loaded after the Qualify statement.

Note!
The qualify statement should not be used in conjunction with partial reload!

Qualification is always turned off by default at the beginning of script execution. Qualification of a field name can be activated at any time using a qualify statement. Qualification can be turned off at any time using an Unqualify statement.

The syntax is:

qualify *fieldlist

*fieldlist is a comma separated list of the fields for which qualification should be turned on. Using * as field list indicates all fields. The wildcard characters * and ? are allowed in field names. Quoting of field names may be necessary when wildcards are used.

Examples:

Qualify B;

Load A,B from x.csv;

Load A,B from y.csv;

The two tables x.csv and y.csv are associated only through A. Three fields will result: A, x.B, y.B.

In an unfamiliar database, it is often useful to start out by making sure that only one or a few fields are associated, as illustrated in this example:

qualify *;

unqualify TransID;

select * from tab1;

select * from tab2;

select * from tab3;

Only TransID will be used for associations between the tables tab1, tab2 and tab3.

View solution in original post

7 Replies
Anonymous
Not applicable
Author

You need the Qualify command, here is the Help for it :

Qualify

The Qualify statement is used for switching on the qualification of field names, i.e. field names will get the table name as a prefix.

The automatic association of fields with the same name in different tables can be suspended by means of the qualify statement, which qualifies the field name with its table name. If qualified, the field name(s) will be renamed when found in a table. The new name will be in the form of tablename.fieldname. Tablename is equivalent to the label of the current table, or, if no label exists, to the name appearing after from in load and select statements.

The qualification will be made for all fields loaded after the Qualify statement.

Note!
The qualify statement should not be used in conjunction with partial reload!

Qualification is always turned off by default at the beginning of script execution. Qualification of a field name can be activated at any time using a qualify statement. Qualification can be turned off at any time using an Unqualify statement.

The syntax is:

qualify *fieldlist

*fieldlist is a comma separated list of the fields for which qualification should be turned on. Using * as field list indicates all fields. The wildcard characters * and ? are allowed in field names. Quoting of field names may be necessary when wildcards are used.

Examples:

Qualify B;

Load A,B from x.csv;

Load A,B from y.csv;

The two tables x.csv and y.csv are associated only through A. Three fields will result: A, x.B, y.B.

In an unfamiliar database, it is often useful to start out by making sure that only one or a few fields are associated, as illustrated in this example:

qualify *;

unqualify TransID;

select * from tab1;

select * from tab2;

select * from tab3;

Only TransID will be used for associations between the tables tab1, tab2 and tab3.

Mark_Little
Luminary
Luminary

Hi,

QUALIFY *;

UNQUALIFY *;

Mark

Kushal_Chawda

You can use Qualify keyword. See the below example

Qualify *;

Unqualify Key

Table:

Load A,

        key,

        B,

      C

FROM Table;

unqualify *;

Field name will be as below after loading above statement

Key,

Table.A

Table.B

Table.C

Not applicable
Author

Thanks for the answer, its a great help

Not applicable
Author

Thanks for the help

Not applicable
Author

Thank you for answering my question

Kushal_Chawda

Please mark helpful answer if it is helpful