File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Once again JAVA-ORACLE

 
bala rajesh
Greenhorn
Posts: 6
  • 0
  • 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
  • 0
  • 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
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • 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: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JDBC.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • 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.)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic