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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Can I Drop a Field and Rename it

Hi All,

I have a preceding load wherein I am creating Calculated Fields to be used in the same Load statement.

I want to Keep the field name Date. so can I drop Date after renaming Date_1 into Date?

Load*,

Rename Date_1 into Date;

Drop Field Date;

Load*,

if (Date_2 ='X', 'Flag', Date) as Date_1 ;

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

I would suggest changing the order of Rename and Drop as well


DROP Field Date;

Rename Field Date_1 to Date;

View solution in original post

3 Replies
Saravanan_Desingh
MVP
MVP

Hi,

Push the Rename and Drop after the LOAD statement.

Load *,

if (Date_2 ='X', 'Flag', Date) as Date_1 ;

Load * From [File];

Rename Field Date_1 to Date;

Drop Field Date;

Saravanan_Desingh
MVP
MVP

Sorry.. It should be..

Drop Field Date_1;

sunny_talwar
MVP
MVP

I would suggest changing the order of Rename and Drop as well


DROP Field Date;

Rename Field Date_1 to Date;