Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Linking data to new column

$
0
0

Hi,

I have a metadata table that contains all the columns for my data table.

E.g. 

oldcolumnname    newcolumnname
Size                       Size
WorkIndustry          Industry
Acct                       Account


My existing data table1 shows as below which uses the oldcolumnname:

Acct     Size            WorkIndustry
1111    2                 Finance
2222    3                 Accounting

I have a new table2 that has the newcolumn in it, waiting to be populated from table1.

Account     Size            Industry

1111           2                 Finance
2222           3                Accounting

Is there a way that I can map programmatically that e.g. WorkIndustry (old column) is "Industry"in the new column? And then copy the content from data table1 to table2 using these new columns?


cherriesh



Viewing all articles
Browse latest Browse all 23857

Trending Articles