[
https://issues.apache.org/jira/browse/TRAFODION-2850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297886#comment-16297886
]
ASF GitHub Bot commented on TRAFODION-2850:
-------------------------------------------
Github user liuyu000 commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1354#discussion_r157937569
--- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
@@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the
following:
An unnamed parameter can be used to prepare a statement and then during an
execution, either a function or a simple string parameter can be passed in
which will be converted to LOB data.
* `EMPTY_BLOB()` or `EMPTY_CLOB()`
++
+NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob
column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned
*OFF* before creating the table.
--- End diff --
Hi @DaveBirdsall,
1. The CQD must be turned **'OFF'** before creating a table, otherwise an
error will be raised if `EMPTY_BLOB()` or `EMPTY_CLOB()` is inserted into a lob
column, and the **column definition** of lob column is **VARCHAR** (see the
first attachment).
2. Correct behaviour:
Set the CQD 'OFF', then create a table and insert `EMPTY_BLOB()` or
`EMPTY_CLOB()`, it will succeed and the column definition is **CLOB** rather
than VARCHAR (see the second attachment).
3. The default value of this CQD is ON.
Thanks for your reminding, may I change this note to the following?
Note: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob
column, the CQD `TRAF_CLOB_AS_VARCHAR` which is **ON** by default must be
turned **OFF** before creating a table, otherwise an error will be raised and
the column definition of the lob column is VARCHAR.


> Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for *Trafodion SQL Large Objects
> Guide*
> ------------------------------------------------------------------------------------
>
> Key: TRAFODION-2850
> URL: https://issues.apache.org/jira/browse/TRAFODION-2850
> Project: Apache Trafodion
> Issue Type: Documentation
> Reporter: Liu Yu
> Assignee: Liu Yu
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)