Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Unanswered: SQL Server Query For Table Formatting

    Hello,

    I have a table as below,

    Code:
    ClientId Balance '10/1/2012' '10/2/2012' '10/3/2012' '10/4/2012' '10/5/2012'  
    1        1000        1000        null        null        null        null          
    2        2000        null        2000        null        null        null          
    3        3000        null        null        3000        null        null          
    4        4000        null        null        null        4000        null          
    5        4000        null        null        null        4000        null
    How can I change above table into below format?

    Code:
    ClientId Balance '10/1/2012' '10/2/2012' '10/3/2012' '10/4/2012' '10/5/2012     
    1        1000        1000        1000        1000        1000        1000           
    2        2000        null        2000        2000        2000        2000        
    3        3000        null        null        3000        3000        3000        
    4        4000        null        null        null        4000        4000        
    5        4000        null        null        null        4000        4000
    Help will be appriciated, Thank You!

  2. #2
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    Explain the rule(s) for getting from what you "have" to what you "want".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •