Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot Rename field

I tried to rename a field, because I want it to be associated with an existing field. However this does not work. I can find no restrictions in the reference manual and I don't get an error message either. See code below. Is this a bug or a undocumented feature. : ) (The renaming works when the load sequence is reversed.) Other workarounds are welcome.

SET ErrorMode=1;

Qualify *;

Unqualify 'SID*';

LOAD KEY_SIS_C094,

SID_SIS_RSSTE

FROM

(qvd);

LOAD [SID2_SSS_PLANT_/BIC/SSS_PLANT],

SID_SSS_PLANT,

CHCKFL,

DATAFL,

INCFL

FROM

(qvd);

rename field 'SID_SSS_PLANT' to 'SID_SIS_RSSTE';

11 Replies
Not applicable
Author

Try
LOAD [SID2_SSS_PLANT_/BIC/SSS_PLANT],
SID_SSS_PLANT As SID_SIS_RSSTE,
CHCKFL,
DATAFL,
INCFL
FROM (qvd);

and it should work
Talha

Not applicable
Author

Couldn't you just use an alias?

LOAD...
SID_SSS_PLANT As SID_SIS_RSSTE, ...


Not applicable
Author

Aliassing is not an option because the code from this post is not the actual code. It is just for illiustrating the issue. The original code is generic and based on metadata so i don't know the column names beforehand and my best solution is to use "select * from". I am raising this issue so Qlikview can be improved. My question still remains: is this a (known) bug, or an ommision in the documentation. And if so where can I report this issue ?

biester
Specialist
Specialist

I tried around a little with the thing, and after that I actually think the (intended) behaviour is due to the fact that you are renaming keys.

To put it very simple (as said it's only a very simple way of how I could imagine that things could be, but it would explain the behaviour): after the second load there is no join between the tables and the joining has been done, so you can't rename to a keyfield which would alter the joining; perhaps sort of the logic or mechanism that does not allow you to alter the joining by qualifying and unqualifying AFTER having loaded data. I would report the issue to support and ask for an explanation.

Again, just a simple minded thought. Perhaps some of the specialists here who have a deeper insight could explain.

Rgds,
Joachim

Not applicable
Author

That sounds like a plausible explanation. Still it would have been nice if a "can't rename field to an existing name" error would have been raised or if it would have been documented in the reference guide. A forward to support sounds like a good idea.

Not applicable
Author

Exists some conclustion to this issue?

ToniKautto
Employee
Employee

If this is still an issue with QV10 SR2, please report it as a possible bug to QlikView Support.

http://qlik.com/Support

Not applicable
Author

Actually it's still issue in QV10 SR2. Problem is when I have Linked Object List box with field e.g. CalendarYear and I rename it in script to e.g. BookingYear, than the script just crash without any script error.

ToniKautto
Employee
Employee

You could report it to support for a more detailed evaluation of the crash.

http://qlik.com/Support