Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull



On 10 Aug, 17:19, Thomas Kellerer <FJIFALSDG...@xxxxxxxxxxxxx> wrote:

CASE or NULLIF

http://db.apache.org/derby/docs/10.2/ref/rrefcasenullif.html


Thank you for replying. I had investigated these options and I don't
think they offer what I need.

NULLIF returns a null if meeting a boolean condition, I need to return
0 when it is null.

CASE could give the result but would require the query to be done
twice, once for boolean evaluation and then again to return the
value. If I can only get the value by running the query twice, I
might as well do a union. My hope was that a function existed that
meant I didn't need to do that.


James

.