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

How to transform data from row into column

$
0
0

Hi All,

May any one help me in query for the below scenerio :

  

I have data like this in the table :


IntRecpieID          strName           intMealtypeID          Total

  100'A'  120

  101'B'  2                         30

  100'A'  3                        40



Desired Output required:

IntRecpieID         StrName              1            2            3

 100                          'A'                20           Null        40

 101                          'B'                Null          30        Null

I would be very greatfull to you.

Thanks in Advance


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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