I am joining 2 tables which both have hundreds of similarly named columns. I would like to change all of the column names in each table to include the table name. To keep the query simple, I do not want to call out each column name explicitly. Is there a way to append the table name to all column names without explicitly calling out each column?
For example:
let T1 = datatable (Key:string , Col2:string , Col3:string )[
"1", "b", "c",
"2", "e", "f",
"3", "h", "i"];
let T2 = datatable (Key:string , Col2:string , Col3:string )[
"1", "B", "C",
"2", "E", "F",
"4", "H", "I"];
T1 | join T2 on Key
Result:
Key Col2 Col3 Key1 Col21 Col31
1 b c 1 B C
2 e f 2 E F
Desired Result:
T1.Key T1.Col2 T1.Col3 T2.Key T2.Col2 T2.Col3
1 b c 1 B C
2 e f 2 E F