cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Rename columns contains certain symbol

Hello dear users/experts, 

I have a table has many columns, where some of the columns are started with "std" (some are not),

for example column names could be:

std_A, std_AX, med_XA,data_Ex,std_BN....

 

And i would like to change to 

A_std, AX_std, med_XA, data_EX, BN_std...

 

only remove std at the begining of column names and put them in the end with _

 

 

1 REPLY 1
jthi
Super User

Re: Rename columns contains certain symbol

You can get a list of column names as strings with << Get Column Names("String"), then you can loop over those using For Each(), use if statement with Starts With() to check if column name starts with "std_" and then you can use Words() (or Word()) to split the column name with "_", with that you can build new name and then set it with << Set Name()

-Jarmo