aspose file tools*
The moose likes JDBC and the fly likes EXCEPT Set Operation, Oracle, JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "EXCEPT Set Operation, Oracle, JDBC" Watch "EXCEPT Set Operation, Oracle, JDBC" New topic
Author

EXCEPT Set Operation, Oracle, JDBC

Dave Soto
Ranch Hand

Joined: Sep 15, 2001
Posts: 55
The SQL standard defines set operations UNION, EXCEPT, and INTERSECT. For some odd reason, Oracle departs from this syntax by replacing EXCEPT with MINUS. MINUS behaves exactly as you would expect EXCEPT to behave. Here is my problem:
I was hoping that I could use EXCEPT in my JDBC statements, and that somehow the JDBC driver would know to replace my EXCEPT with a MINUS before querying the database. Instead, the only way it works is if I use MINUS in my JDBC statements.
This is very undesireable, as we occasionally may use a different database. Up to this point all other statements have translated nicely.
Is there a JDBC escape sequence, or some other way to accomplish a database-independent way of performing the EXCEPT set operation? Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EXCEPT Set Operation, Oracle, JDBC
 
Similar Threads
Making the choice of RDBMS configurable
Clob in Oracle 10g
is it a good solution ?
Problem in Two-phase Commit
writing database-independent classes with sequential types