You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by jt...@apache.org on 2005/05/18 01:57:15 UTC
svn commit: r170690 - /incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita
Author: jta
Date: Tue May 17 16:57:15 2005
New Revision: 170690
URL: http://svn.apache.org/viewcvs?rev=170690&view=rev
Log:
DERBY-272 (http://issues.apache.org/jira/browse/DERBY-272):
Fixed information about NULLIF in the Derby documentation.
Modified:
incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita
Modified: incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita
URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita?rev=170690&r1=170689&r2=170690&view=diff
==============================================================================
--- incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita (original)
+++ incubator/derby/docs/trunk/src/ref/rrefcasenullif.dita Tue May 17 16:57:15 2005
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
<!--
Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.
@@ -14,16 +16,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
- "../dtd/reference.dtd">
<reference id="rrefcasenullif" xml:lang="en-us">
<title>NULLIF and CASE expressions</title>
+<prolog><metadata>
+<keywords><indexterm>NULLIF expression</indexterm><indexterm>CASE expression</indexterm>
+</keywords>
+</metadata></prolog>
<refbody>
<section><p>Use the CASE and NULLIF expressions for conditional expressions
in <ph conref="refconrefs.dita#prod/productshortname"></ph>.</p></section>
-<section><p><indexterm>NULLIF expression</indexterm><b>NULLIF expression syntax</b> <codeblock>NULLIF(L, R)</codeblock></p></section>
-<section><p><indexterm>CASE expression</indexterm><b>CASE expression syntax</b></p></section>
+<section><p><b>NULLIF expression syntax</b> <codeblock>NULLIF(L, R)</codeblock>The
+NULLIF expression is very similar to the CASE expression. For
+example: <codeblock>NULLIF(V1,V2)</codeblock> is equivalent to the following
+CASE expression:<codeblock>CASE WHEN V1=V2 THEN NULL ELSE V1 END</codeblock></p></section>
+<section><p><b>CASE expression syntax</b></p></section>
<section><p>You can place a CASE expression anywhere an expression is allowed.
It chooses an expression to evaluate based on a boolean test.</p></section>
<example> <codeblock>CASE WHEN BooleanExpression THEN thenExpression ELSE elseExpression END</codeblock></example>
@@ -39,4 +45,3 @@
the CASE expression for when a nullable column is a primitive method parameter. </p></section>
</refbody>
</reference>
-