- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Set Column Names to UpperCase
I am trying to set all the Column Names to uppercase. I have tried the below but it just changes the list to uppercase not the columns.
col_name_list = dt3 << get column names(string);
for (i = 1, i <= nitems(col_name_list), i++,
col_name_list[i] = uppercase(col_name_list[i]);
What do I need to do to change all of my column names to uppercase?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Column Names to UpperCase
Created:
Feb 25, 2019 12:23 PM
| Last Modified: Feb 25, 2019 9:33 AM
(5982 views)
| Posted in reply to message from wjalford 02-25-2019
Try this ?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
CurrentCols = dt << Get Column Names("String");
Show(CurrentCols);
for(i = 1, i <= N Items(CurrentCols) , i++,
Column(dt,i) << Set Name(Uppercase(CurrentCols[i]));
);NewCols = dt << Get Column Names("String"); Show(NewCols);
You are going on the right track, the thing that you needed to add was the ability to set the column names in the table back to your new column names.
Best
Uday
Uday
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Column Names to UpperCase
Created:
Feb 25, 2019 12:23 PM
| Last Modified: Feb 25, 2019 9:33 AM
(5983 views)
| Posted in reply to message from wjalford 02-25-2019
Try this ?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
CurrentCols = dt << Get Column Names("String");
Show(CurrentCols);
for(i = 1, i <= N Items(CurrentCols) , i++,
Column(dt,i) << Set Name(Uppercase(CurrentCols[i]));
);NewCols = dt << Get Column Names("String"); Show(NewCols);
You are going on the right track, the thing that you needed to add was the ability to set the column names in the table back to your new column names.
Best
Uday
Uday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Set Column Names to UpperCase
Worked great. Thank you.