Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- From: Thomas Kellerer <FJIFALSDGVAF@xxxxxxxxxxxxx>
- Date: Tue, 14 Aug 2007 13:10:15 +0200
James Appleby wrote:
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.
Why would you need to run the Query twice when using CASE?
Can you give an example of what you are trying to do? I'm pretty sure that I could replace Oracle's nvl with a CASE without running a statement twice.
Thomas
.
- Follow-Ups:
- References:
- JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- From: James Appleby
- Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- From: Thomas Kellerer
- Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- From: James Appleby
- JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- Prev by Date: Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- Next by Date: Re: jvm crash when using ojdbc1.4
- Previous by thread: Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- Next by thread: Re: JavaDB / Apache Derby equivalent to the SQL Server IsNull, Oracle nvl and MySQL IfNull
- Index(es):