aspose file tools
The moose likes JDBC and the fly likes SQL Server 2008 PIVOT Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "SQL Server 2008 PIVOT" Watch "SQL Server 2008 PIVOT" New topic
Author

SQL Server 2008 PIVOT

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 571

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...


===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 571

###SOLVED
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Server 2008 PIVOT
 
Similar Threads
Joined Strategy Inheritance problem
Better sql statement?
Error in executeQuery() on callableStatement
Search Strategy
how to retrieve values from more than two tables