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/12/19 20:19:07 UTC
svn commit: r357757 - /db/derby/docs/trunk/src/ref/rrefcasenullif.dita
Author: jta
Date: Mon Dec 19 11:19:03 2005
New Revision: 357757
URL: http://svn.apache.org/viewcvs?rev=357757&view=rev
Log:
DERBY-725 : Applied Jeff Levitt's patch that removes the two paragraphs
referenced in the bug report.
Modified:
db/derby/docs/trunk/src/ref/rrefcasenullif.dita
Modified: db/derby/docs/trunk/src/ref/rrefcasenullif.dita
URL: http://svn.apache.org/viewcvs/db/derby/docs/trunk/src/ref/rrefcasenullif.dita?rev=357757&r1=357756&r2=357757&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefcasenullif.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefcasenullif.dita Mon Dec 19 11:19:03 2005
@@ -18,30 +18,22 @@
-->
<reference id="rrefcasenullif" xml:lang="en-us">
<title>NULLIF and CASE expressions</title>
+<shortdesc>Use the CASE and NULLIF expressions for conditional expressions
+in <ph conref="refconrefs.dita#prod/productshortname"></ph>.</shortdesc>
<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><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>
-<section><p><i>ThenExpression</i> and <i>ElseExpression</i> are both expressions
-that must be type-compatible. For built-in types, this means that the types
-must be the same or a built-in broadening conversion must exist between the
-types.</p></section>
-<section><p>You do not need to use the CASE expression for avoiding <i>NullPointerExceptions</i> when
-a nullable column becomes a method receiver. <codeblock>-- returns 3
-<b>VALUES CASE WHEN 1=1 THEN 3 ELSE 4 END;</b></codeblock>If the value of
-the instance specified in an instance method invocation is null, the result
-of the invocation is null (SQL NULL). However, you still might need to use
-the CASE expression for when a nullable column is a primitive method parameter. </p></section>
+<example><title>NULLIF expression syntax</title><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></example>
+<example><title>CASE expression syntax</title><p>You can place a CASE expression
+anywhere an expression is allowed. It chooses an expression to evaluate based
+on a boolean test.</p><codeblock>CASE WHEN BooleanExpression THEN thenExpression ELSE elseExpression END</codeblock><p><i>ThenExpression</i> and <i
+>ElseExpression</i> are both expressions that must be type-compatible. For
+built-in types, this means that the types must be the same or a built-in broadening
+conversion must exist between the types.</p><codeblock><b>-- returns 3</b>
+VALUES CASE WHEN 1=1 THEN 3 ELSE 4 END;</codeblock></example>
</refbody>
</reference>