Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
dennis_o
Contributor III
Contributor III

Renaming a field in a table without reloading the table

Is it possible to do this?

It would make sense to say:

Rename field

     X

from

     Y

To

     Z

Unfortunately this from syntax does not seem to exist in this context.

Instead all fields are renamed, which causes problems if you want to rename only the field of one table.

I work with noconcatenated tables, so I work with independand data.

1 Solution

Accepted Solutions
dennis_o
Contributor III
Contributor III
Author

I solve this problem now by:

:

     NOCONCATENATE LOAD

          *,

          X AS 'Z'

     FROM

          [STH];

     DROP FIELD

          X

    

     FROM

          Y;

View solution in original post

4 Replies
klausskalts
Partner
Partner

Rename field X to Y;

Should Work ....

dennis_o
Contributor III
Contributor III
Author

It does not work, if a different table already has a field Y.

The fieldname was Z btw.

Furthermore it renames fields in other tables that are also called X to Z.

klausskalts
Partner
Partner

That's correct,

1) you cannot rename a field to a field name which already exists.

2) renaming a field will rename the field globally

But what is it you try to achieve?

One thing you might do is to utilize the ALIAS function. If you load all your Alias' in the beginning of the script then it should rename the fields as you go along.

dennis_o
Contributor III
Contributor III
Author

I solve this problem now by:

:

     NOCONCATENATE LOAD

          *,

          X AS 'Z'

     FROM

          [STH];

     DROP FIELD

          X

    

     FROM

          Y;

View solution in original post