Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
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 ;

1 Solution

Accepted Solutions
sunny_talwar

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

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

Sorry.. It should be..

Drop Field Date_1;

sunny_talwar

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


DROP Field Date;

Rename Field Date_1 to Date;