This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Once again JAVA-ORACLE

 
bala rajesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know about JDBC

I want a "query" to retrive the data from one oracle table,
the condition is one column orderby ascending order and another column orderby desc order.

Thanks in Advance

Bala
 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bala

If this is what you want

column A Column B
A Z
B Y
C X


Then I will say there is no ready-to-use solution.
You can however query these columns seperatly and club the result-sets together in java.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know if this would work everywhere (I tried with Oracle 8i):
SELECT
columnA,
columnB
FROM
mytable
ORDER BY
columnA ASC,
columnB DESC
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JDBC.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satou,
The query you provided uses standard SQL so it will work on all databases (with the possible exception of Access.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic