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

Help with Query

$
0
0

I have this table in ms sql server 2008:                                                                                                                                      

   NAME       INFO            VALUE                                                                                                                                             

Ilan              Age                  34                                                                                                                                              

Ilan             Hight               170                                                                                                                                              

Almog         Hight              16                                                                                                                                                 

Almog         Weight            55                                                                                                                                                  

Eran             Hight               164                                                                                                                                               

Eran             Age                   27                                                                                                                                               

Eran            Weight              65                                                                                                                                              

I need to writeOne query that will show the data like this:                                                                                                            

NAME         Age          Hight          Weight                                                                                                                                

 Ilan              34            170                                                                                                                                                   

Almog                           165               55                                                                                                                                

Etc'…………                                                                                                                                                                             

………………………………                                                                                                                                                                 

I need to use the sql GROUP BY function and CASE statement.                                                                                                   

NOT ALLOWED TO USE THE PIVOT FUNCTION.                                                                                                                        

THANKS FOR YOUR ANSWERS :-).                                                                                                                                         

                                           

 





Viewing all articles
Browse latest Browse all 23857

Trending Articles



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