• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Server 2008 PIVOT

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have a requirement to create a cross-tab query in MS SQL Server 2008....After reading up a bit I started trying to do this with the PIVOT operator.
The cross-tab query is tod display a table of exchange rates
Let me show you the table data that I am operating on:



yields(although the exchange rates are backward):


Then I use the following to do the pivot:



which yields:



The problem is that I dont want values repeated in the secondCurrency column....They should all appear on the same row for any given 'secondCurrency'
Please assist?
Thanks...
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
###SOLVED
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic