mardi 4 août 2015

mapping row to column names in sql

i have two tables Table A and Table B

A.

channelname  variablename
------------------------------
TCO1           INPUT CHANNEL  
TC02           OUTPUT CHANNEL
TCO3           TEST CHANNEL

B.

TC01    TC02   TC03
--------------------
100     443    322
200     566    990
376     453    342
45      422    856

I want the output of table B as :

inputchannel   outputchannel   testchannel
--------------------------------------------- 
100            443             322
200            566             990
376            453             342
45             422             856

Aucun commentaire:

Enregistrer un commentaire