The following example script will convert the data type of all columns in the current data table to a data type of Character. This is simply a more concise suggestion than what was offered earlier in this thread.
In order to loop through the columns, you do not need to know how many columns there are, nor their names, prior to the For() loop. The NCol() function returns the number of columns in the data table. The Column() function allows you to refer to a column by index.
dt = Current Data Table();
For( i = 1, i <= N Col( dt ), i++,
Column( dt, i ) << Data Type( "Character" )
);
Hope that helps.
Wendy