How to preserve numeric column types when concatenating tables with empty columnsHello,
I have two tables ((imported from csv files initially) that I want to concatenate, each containing only one column, “Column 1” (see screenshot below). In the first table, there is no data; it is empty and of the Nominal character type (defaut, when exporting the csv).
In the second table, there is numerical data.
When I concatenate the two tables, the final format is nominal character even though there is numerical data.
Is there any option to have this detected automatically as numeric?
Additional information:
- It is automated, I have this problem on many columns.
- I do not know in advance which columns are numeric.
- I do not know in advance which tables have no data.

Automation and ScriptingRe: How to preserve numeric column types when concatenating tables with empty columnsYou can check if columns are numeric before concatenation and update final result accordingly. Or you could go over character columns after you are done concatenating and change them. I haven't tried this exact method myself (<< fail on conversion), but I think it should work fine
Names Default To Here(1);
dt = New Table("My Table",
New Column("col1", Character, "Nominal", Set Values({"123", "456", "abc", "789", "", "def"})),
New Column("col2", Character, "Nominal",Set Values({"123", "456", "789", "", "", ""}))
);
For Each({colname}, dt << Get Column Names("Character", "String"),
r = Column(dt, colname) << Set Data Type("Numeric", <<FAIL on="" conversion="" error=""></FAIL>Re: How to preserve numeric column types when concatenating tables with empty columnsHello, thank you I didn't now about these functions it solved my issue !