This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Seemingly simple EJB-QL question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Seemingly simple EJB-QL question" Watch "Seemingly simple EJB-QL question" New topic
Author

Seemingly simple EJB-QL question

Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2853
    
  11

I need to retrieve a single record matching two fields, call them jib and jab. The query is easy enough:



I know there will only be a single record, because I have a unique key constraint on jib and jab. However, jab can be null, and equality comparison doesn't work with nulls. I tried something like:


Checking parameters with "IS NULL" apparently doesn't work though, even though it works in ordinary SQL. The only solution I can think of is to write two queries and force the application to decide which one to use. I'd appreciate any suggestions!

We're using BEA WebLogic 8.1 and Oracle 9i.
 
GeeCON Prague 2014
 
subject: Seemingly simple EJB-QL question