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

Tricky Split, Rename column name and transpose to Rows

$
0
0

I have result set like this.

SubgroupsAlbania TAX4 2005Bangladesh TAX4 2006
Total6847.5
Male67.847.5
Female68.247.4
Urban76.156.4
Rural63.644.3

And I need to put that into below.

SubgroupsCountryYearValue
TotalAlbania200568
MaleAlbania200567.8
FemaleAlbania200568.2
UrbanAlbania200576.1
RuralAlbania200563.6
TotalBangladesh200647.5
MaleBangladesh200647.5
FemaleBangladesh200647.4
UrbanBangladesh200656.4
RuralBangladesh200644.3

Can you please help?

Thanks,

Koti


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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