Converting rows into columns using SQL Server 2008

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Orbie
    New Member
    • Nov 2009
    • 7

    Converting rows into columns using SQL Server 2008

    Hi Guys,
    I need some help with pivoting or converting some rows on a Table into columns using SQL Server 2008! I have a Table which contains the same Products in 4 different Stores. I'm only interested in the Product_ID, Description and the Estimated Price fields for Store 1, however for the other stores (2,3 and 4) i need to display the Actaul Price and the Size on the same line of output.

    I've attached an example of the Table which contains approx 40,000 rows so the output after the concatenation would be approx 10,000 rows

    If your providing an example, please use my field names etc..as it helps with understanding.

    Thanks,

    Orbie.
    Attached Files
Working...