• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

EXCEPT Set Operation, Oracle, JDBC

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic