doc-exports/docs/dli/sqlreference/dli_spark_initcap.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

43 lines
3.6 KiB
HTML

<a name="dli_spark_initcap"></a><a name="dli_spark_initcap"></a>
<h1 class="topictitle1">initcap</h1>
<div id="body8662426"><p id="dli_spark_initcap__en-us_topic_0000001696219569_p1611917543309">This function is used to convert the first letter of each word of a string to upper case and all other letters to lower case.</p>
<div class="section" id="dli_spark_initcap__en-us_topic_0000001696219569_section45291954203217"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="dli_spark_initcap__en-us_topic_0000001696219569_screen1164981619226">initcap(string A) </pre>
</div>
<div class="section" id="dli_spark_initcap__en-us_topic_0000001696219569_section992014913317"><h4 class="sectiontitle">Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_spark_initcap__en-us_topic_0000001696219569_table1829154762513" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter</caption><thead align="left"><tr id="dli_spark_initcap__en-us_topic_0000001696219569_row8830104792517"><th align="left" class="cellrowborder" valign="top" width="19.220000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_spark_initcap__en-us_topic_0000001696219569_p983074711252">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.420000000000002%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_spark_initcap__en-us_topic_0000001696219569_p6830124732517">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.590000000000002%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_spark_initcap__en-us_topic_0000001696219569_p13318164512614">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.77%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_spark_initcap__en-us_topic_0000001696219569_p08301547132513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_spark_initcap__en-us_topic_0000001696219569_row2826191220118"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_spark_initcap__en-us_topic_0000001696219569_p1382631201120">A</p>
</td>
<td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_spark_initcap__en-us_topic_0000001696219569_p14826312111113">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_spark_initcap__en-us_topic_0000001696219569_p18826101211118">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="51.77%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_spark_initcap__en-us_topic_0000001696219569_p026862711252">Text string to be converted</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_spark_initcap__en-us_topic_0000001696219569_section210162513312"><h4 class="sectiontitle">Return Values</h4><p id="dli_spark_initcap__en-us_topic_0000001696219569_p188481918104016">The return value is of the STRING type. In the string, the first letter of each word is capitalized, and the other letters are lowercased.</p>
</div>
<div class="section" id="dli_spark_initcap__en-us_topic_0000001696219569_section13277192233920"><h4 class="sectiontitle">Example Code</h4><p id="dli_spark_initcap__en-us_topic_0000001696219569_p1326644217719">The value <strong id="dli_spark_initcap__en-us_topic_0000001696219569_b19979124710205">Dli Sql</strong> is returned.</p>
<pre class="screen" id="dli_spark_initcap__en-us_topic_0000001696219569_screen11140948475">SELECT initcap("dLI sql");</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_0472.html">String Functions</a></div>
</div>
</div>