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

Linking data to a 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:

AcctSize WorkIndustry
11112                FinancePrimary22223                Accounting

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

AccountSize Industry

11112                Finance22223               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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>