• 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: 34207
341
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