Vince,
Thanks for the insight. I guess it's a tricky thing because depending upon the situation some characters can have different meanings (e.g. "-" or "e") . Your code worked as you wrote it, but it failed on my set because of missing values. Those could be handled by more arguments in the Substitute command to find and eliminate the string "", .
Parse(Substitute(char(values), "\!"\!"\!, ", "", "\!"", "", "{", "[", "}", "]"));
However all of my Column 2 are values that could be interpretted as dates so this code also interpretted them as such.
names default to here(1);
dt = New Table( "Test",
Add Rows( 4 ),
New Column( "Column 1",
Character,
"Nominal",
Set Values( {"A", "B", "C", "D"} )
),
New Column( "Column 2",
Character,
"Nominal",
Set Values( {"100-0001-01", "100-0001-01", "100-0001-01", "100-0001-01"} )
),
New Column( "Column 3",
Character,
"Nominal",
Set Selected,
Set Values( {"1", "2", "", "4"} )
)
);
dt = current data table();
for(i=1, i<=ncols(dt), i++,
col = Column(dt, i);
values = col << Get Values;
Try(
Parse(Substitute(char(values), "\!"\!"\!, ", "", "\!"", "", "{", "[", "}", "]"));
col << Data Type("Numeric") << Modeling Type("Continuous");
);
);
Although not perfect, I can go with this or with txnelson's code because the column that it converts as a date is not important to me. If I knew that it was being interpretted as a date, I could make that an exception. I don't have dates in this set of data.
Pat