forked from docs/doc-exports
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>
736 lines
77 KiB
HTML
736 lines
77 KiB
HTML
<a name="dli_08_0096"></a><a name="dli_08_0096"></a>
|
|
|
|
<h1 class="topictitle1">String Functions</h1>
|
|
<div id="body1574406512512"><p id="dli_08_0096__p1765654816251">The common string functions of DLI are as follows:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__t37861fbf06704abd943705c4df6fc034" frame="border" border="1" rules="all"><caption><b>Table 1 </b>String operators</caption><thead align="left"><tr id="dli_08_0096__ra540ee8f9b744b4bbdc33037a67425d1"><th align="left" class="cellrowborder" valign="top" width="22.96%" id="mcps1.3.2.2.4.1.1"><p id="dli_08_0096__a24dab29367fc46f0bd204d1d611ea344"><strong id="dli_08_0096__b122541427134017">Operator</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.52%" id="mcps1.3.2.2.4.1.2"><p id="dli_08_0096__aec233f851e7e42c692a3f75feac66985"><strong id="dli_08_0096__b191951834184016">Returned Data Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.519999999999996%" id="mcps1.3.2.2.4.1.3"><p id="dli_08_0096__a8df3ed358c5643c08404b5af6196cf7d"><strong id="dli_08_0096__b1433212366403">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__rd1d99da05c8d474fabc56a71202268eb"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__a79d6dd8ec0114565b012f1f31db7b2f1"><a href="#dli_08_0096__section9727458134419">||</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__a1c787cbd6cbc4d278ed5072aa1e1342e">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__a6c9c4405035b444e852c82123893ee3e">Concatenates two strings.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__r30f1ea888db54820bf4a7c0db7b15a85"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__a3754c568d4cc431aa01f4bb7aff50818"><a href="#dli_08_0096__section511503164915">CHAR_LENGTH</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__a758bc06663a74e63b84cae79ae10124f">INT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__a6a0bdacd88d94d2396976098b7925bca">Returns the number of characters in a string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__r1218d82f93cb4572991c105c5a7ad13f"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__a16c8d6191e5d4254956c7af7f96193e4"><a href="#dli_08_0096__section18626101155017">CHARACTER_LENGTH</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__a4b5a326265e7435b934cb6223fa0e85f">INT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__en-us_topic_0060575886_p680015613125">Returns the number of characters in a string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row5362942175418"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p1510628143314"><a href="#dli_08_0096__section1941511592278">CONCAT</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p310628153312">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p1410228143312">Concatenates two or more string values to form a new string. If the value of any parameter is <strong id="dli_08_0096__b09865419465">NULL</strong>, skip this parameter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row83633423547"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p7107283337"><a href="#dli_08_0096__section858291242912">CONCAT_WS</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p91011281334">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p610328203310">Concatenates each parameter value and the separator specified by the first parameter separator to form a new string. The length and type of the new string depend on the input value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row85130581573"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p15514125811576"><a href="#dli_08_0096__section089042532319">HASH_CODE</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p95149587575">INT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p155148585579">Returns the absolute value of <strong id="dli_08_0096__b136804216479">HASH_CODE()</strong> of a string. In addition to <strong id="dli_08_0096__b12741411134712">string</strong>, <strong id="dli_08_0096__b579111184712">int</strong>, <strong id="dli_08_0096__b1379141118477">bigint</strong>, <strong id="dli_08_0096__b280101114714">float</strong>, and <strong id="dli_08_0096__b1880711194710">double</strong> are also supported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1051419583570"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p13656136175818"><a href="#dli_08_0096__section870614420584">INITCAP</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p765653614588">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p76564366585">Returns a string whose first letter is in uppercase and the other letters in lowercase. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row0415193818117"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p2416153811117"><a href="#dli_08_0096__section114504453324">IS_ALPHA</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p2416138713">BOOLEAN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p114162382019">Checks whether a string contains only letters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row13110520335"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p131109201730"><a href="#dli_08_0096__section11496210113613">IS_DIGITS</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p6110182013319">BOOLEAN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p6110182019315">Checks whether a string contains only digits.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row027319235517"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p1327315233514"><a href="#dli_08_0096__section35411640163419">IS_NUMBER</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p1927392317511">BOOLEAN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p127317231756">Checks whether a string is numeric.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row597519247615"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p79755241167"><a href="#dli_08_0096__section229175583720">IS_URL</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p9976824667">BOOLEAN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p1997611244610">Checks whether a string is a valid URL.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1051014519818"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p195105510815"><a href="#dli_08_0096__section10302139205814">JSON_VALUE</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p151015520810">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p165102520816">Obtains the value of a specified path in a JSON string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row91417177917"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p131415171696"><a href="#dli_08_0096__section281262819297">KEY_VALUE</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p201419171195">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p11141117797">Obtains the value of a key in a key-value pair string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row390418279104"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p149671536151019"><a href="#dli_08_0096__section1558193715588">LOWER</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p17967143601016">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p8967203651018">Returns a string of lowercase characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row075865917112"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p56911814171217"><a href="#dli_08_0096__section46291824203214">LPAD</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p166911614191217">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p269216142125">Concatenates the pad string to the left of the str string until the length of the new string reaches the specified length len.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row5987171918167"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p99881719101619"><a href="#dli_08_0096__section5579173518713">MD5</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p6988181911610">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p14988819161610">Returns the MD5 value of a string. If the parameter is an empty string (that is, the parameter is <strong id="dli_08_0096__b1546414205510">"</strong>), an empty string is returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row21891755111915"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p13196761815"><a href="#dli_08_0096__section16107161311363">OVERLAY</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p6319157121814">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p831913771815">Replaces the substring of <strong id="dli_08_0096__b185311028175119">x</strong> with <strong id="dli_08_0096__b3536192818518">y</strong>. Replace length+1 characters starting from <strong id="dli_08_0096__b1629810103521">start_position</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row76259565228"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p141905553196"><a href="#dli_08_0096__section174871931132317">POSITION</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p10190755131918">INT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p1319055519192">Returns the position of the first occurrence of the target string <strong id="dli_08_0096__b071353420525">x</strong> in the queried string <strong id="dli_08_0096__b471816340521">y</strong>. If the target string <strong id="dli_08_0096__b3626115025219">x</strong> does not exist in the queried string <strong id="dli_08_0096__b14632165005213">y</strong>, <strong id="dli_08_0096__b1463265018527">0</strong> is returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row431977121812"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p15147122016262"><a href="#dli_08_0096__section1427510535106">REPLACE</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p27171126204710">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p1971742611470">Replaces all <strong id="dli_08_0096__b4200191635311">str2</strong> in the <strong id="dli_08_0096__b5205171645320">str1</strong> string with <strong id="dli_08_0096__b7205616155311">str3</strong>.</p>
|
|
<ul id="dli_08_0096__ul1654131914285"><li id="dli_08_0096__li105418191284"><strong id="dli_08_0096__b41002050175317">str1</strong>: original character.</li><li id="dli_08_0096__li555019162810"><strong id="dli_08_0096__b4509530530">str2</strong>: target character.</li><li id="dli_08_0096__li1855151912283"><strong id="dli_08_0096__b3539955175315">str3</strong>: replacement character.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1423411416292"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p423420419291"><a href="#dli_08_0096__section24420324307">RPAD</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p623417418293">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p8234144202912">Concatenates the pad string to the right of the str string until the length of the new string reaches the specified length len.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1029915363117"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p15321133113324"><a href="#dli_08_0096__section595513321186">SHA1</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p10322331103220">STRING</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p6322731173220">Returns the SHA1 value of the <strong id="dli_08_0096__b24331109542">expr</strong> string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1530019532316"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p432363119321"><a href="#dli_08_0096__section1742102714911">SHA256</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p16323173113216">STRING</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p232333103212">Returns the SHA256 value of the <strong id="dli_08_0096__b0805112205416">expr</strong> string.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row5641165114333"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p1964175103314"><a href="#dli_08_0096__section2011913586245">STRING_TO_ARRAY</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p1464275123313">ARRAY[STRING]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p46421515330">Separates the <strong id="dli_08_0096__b1431695225412">value</strong> string as string arrays by using the delimiter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1734284013357"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p165951942193515"><a href="#dli_08_0096__section4366645154114">SUBSTRING</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p1459584283518">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p12595194211352">Returns the substring starting from a fixed position of A. The start position starts from 1.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row146153313610"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__p361143318362"><a href="#dli_08_0096__section84703469261">TRIM</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__p13611433163613">STRING</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__p1762183317366">Removes A at the start position, or end position, or both the start and end positions from B. By default, string expressions A at both the start and end positions are removed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__r7a3e33d46c034b6a931cfed2f7848118"><td class="cellrowborder" valign="top" width="22.96%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0096__en-us_topic_0060575886_p391073716217"><a href="#dli_08_0096__section19635513115615">UPPER</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.52%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0096__en-us_topic_0060575886_p189361357399">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.519999999999996%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0096__a31d56eeb11e147fa93ec2064dee6ea32">Returns a string converted to uppercase characters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section9727458134419"><a name="dli_08_0096__section9727458134419"></a><a name="section9727458134419"></a><h4 class="sectiontitle">||</h4><ul id="dli_08_0096__ul4728258114411"><li id="dli_08_0096__li67284586443">Function<p id="dli_08_0096__p872819586448"><a name="dli_08_0096__li67284586443"></a><a name="li67284586443"></a>Concatenates two strings.</p>
|
|
</li><li id="dli_08_0096__li7728258184418">Syntax<pre class="screen" id="dli_08_0096__screen172813581441">VARCHAR VARCHAR a || VARCHAR b</pre>
|
|
</li><li id="dli_08_0096__li4728135844413">Parameters<ul id="dli_08_0096__ul972875884419"><li id="dli_08_0096__li972895874415"><strong id="dli_08_0096__b19220145918507">a</strong>: string.</li><li id="dli_08_0096__li14728658184411"><strong id="dli_08_0096__b179961419511">b</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li11728458104418">Example<ul id="dli_08_0096__ul1570143223015"><li id="dli_08_0096__li5348202618306">Test statement<pre class="screen" id="dli_08_0096__screen12348152693016">SELECT "hello" || "world";</pre>
|
|
</li><li id="dli_08_0096__li634913265302">Test result<pre class="screen" id="dli_08_0096__screen1134992620301">"helloworld"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section511503164915"><a name="dli_08_0096__section511503164915"></a><a name="section511503164915"></a><h4 class="sectiontitle">CHAR_LENGTH</h4><ul id="dli_08_0096__ul12115231499"><li id="dli_08_0096__li1311518313492">Function<p id="dli_08_0096__p9115103164920"><a name="dli_08_0096__li1311518313492"></a><a name="li1311518313492"></a>Returns the number of characters in a string.</p>
|
|
</li><li id="dli_08_0096__li01161336499">Syntax<pre class="screen" id="dli_08_0096__screen11116153144916">INT CHAR_LENGTH(a)</pre>
|
|
</li><li id="dli_08_0096__li011611384911">Parameters<ul id="dli_08_0096__ul141161136494"><li id="dli_08_0096__li18116134491"><strong id="dli_08_0096__b7842123075110">a</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li669745144112">Example<ul id="dli_08_0096__ul369765120416"><li id="dli_08_0096__li5698185114117">Test statement<pre class="screen" id="dli_08_0096__screen1569875104114">SELECT CHAR_LENGTH(var1) as aa FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li156981251154115">Test data and result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table6635194518616" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Test data and result</caption><thead align="left"><tr id="dli_08_0096__row176357451613"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p10636545767">Test Data (var1)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p3636045662">Test Result (aa)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row163614454615"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p2063619453618">abcde123</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p96361745361">8</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section18626101155017"><a name="dli_08_0096__section18626101155017"></a><a name="section18626101155017"></a><h4 class="sectiontitle">CHARACTER_LENGTH</h4><ul id="dli_08_0096__ul186265115502"><li id="dli_08_0096__li146269111509">Function<p id="dli_08_0096__p3626161116500"><a name="dli_08_0096__li146269111509"></a><a name="li146269111509"></a>Returns the number of characters in a string.</p>
|
|
</li><li id="dli_08_0096__li5626211155011">Syntax<pre class="screen" id="dli_08_0096__screen18626191110504">INT CHARACTER_LENGTH(a)</pre>
|
|
</li><li id="dli_08_0096__li12812181115509">Parameters<ul id="dli_08_0096__ul11812191105019"><li id="dli_08_0096__li1081213115508"><strong id="dli_08_0096__b1356719207525">a</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li085010268523">Example<ul id="dli_08_0096__ul178501726175214"><li id="dli_08_0096__li9851926185215">Test statement<pre class="screen" id="dli_08_0096__screen98517269521">SELECT CHARACTER_LENGTH(var1) as aa FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li86337101515">Test data and result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table13623791519" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Test data and result</caption><thead align="left"><tr id="dli_08_0096__row86133761512"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p866375159">Test Data (var1)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p147153761513">Test Result (aa)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row1371037161519"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p270377154">abcde123</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p071937181510">8</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section1941511592278"><a name="dli_08_0096__section1941511592278"></a><a name="section1941511592278"></a><h4 class="sectiontitle">CONCAT</h4><ul id="dli_08_0096__ul18415659182716"><li id="dli_08_0096__li041545922718">Function<p id="dli_08_0096__p3416145952720"><a name="dli_08_0096__li041545922718"></a><a name="li041545922718"></a>Concatenates two or more string values to form a new string. If the value of any parameter is NULL, skip this parameter.</p>
|
|
</li><li id="dli_08_0096__li74169597273">Syntax<pre class="screen" id="dli_08_0096__screen154161559102712">VARCHAR CONCAT(VARCHAR var1, VARCHAR var2, ...) </pre>
|
|
</li><li id="dli_08_0096__li10416175917272">Parameters<ul id="dli_08_0096__ul13416459132717"><li id="dli_08_0096__li15416185902715"><strong id="dli_08_0096__b68851555135216">var1</strong>: string</li><li id="dli_08_0096__li124168591275"><strong id="dli_08_0096__b1951258175215">var2</strong>: string</li></ul>
|
|
</li><li id="dli_08_0096__li741645982720">Example<ul id="dli_08_0096__ul1235175963419"><li id="dli_08_0096__li19351259103413">Test statement<pre class="screen" id="dli_08_0096__screen83519596349">SELECT CONCAT("abc", "def", "ghi", "jkl");</pre>
|
|
</li><li id="dli_08_0096__li73511159113418">Test result<pre class="screen" id="dli_08_0096__screen1135215916340">"abcdefghijkl"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section858291242912"><a name="dli_08_0096__section858291242912"></a><a name="section858291242912"></a><h4 class="sectiontitle">CONCAT_WS</h4><ul id="dli_08_0096__ul1958216129299"><li id="dli_08_0096__li1358219129294">Function<p id="dli_08_0096__p1658281212290"><a name="dli_08_0096__li1358219129294"></a><a name="li1358219129294"></a>Concatenates each parameter value and the separator specified by the first parameter separator to form a new string. The length and type of the new string depend on the input value.</p>
|
|
<div class="note" id="dli_08_0096__note154441518355"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_08_0096__p4543159351">If the value of <strong id="dli_08_0096__b95044599537">separator</strong> is <strong id="dli_08_0096__b123721047175318">null</strong>, <strong id="dli_08_0096__b7593172135414">separator</strong> is combined with an empty string. If other parameters are set to null, the parameters whose values are null are skipped during combination.</p>
|
|
</div></div>
|
|
</li><li id="dli_08_0096__li65821212182915">Syntax<pre class="screen" id="dli_08_0096__screen14582111210298">VARCHAR CONCAT_WS(VARCHAR separator, VARCHAR var1, VARCHAR var2, ...)</pre>
|
|
</li><li id="dli_08_0096__li55835121294">Parameters<ul id="dli_08_0096__ul2583712152911"><li id="dli_08_0096__li165831012102918"><strong id="dli_08_0096__b1269582925414">separator</strong>: separator.</li><li id="dli_08_0096__li14583121292910"><strong id="dli_08_0096__b1621131155416">var1</strong>: string</li><li id="dli_08_0096__li185971430122717"><strong id="dli_08_0096__b524423216549">var2</strong>: string</li></ul>
|
|
</li><li id="dli_08_0096__li15583512202911">Example<ul id="dli_08_0096__ul676195910364"><li id="dli_08_0096__li576125920365">Test statement<pre class="screen" id="dli_08_0096__screen1976245917367">SELECT CONCAT_WS("-", "abc", "def", "ghi", "jkl");</pre>
|
|
</li><li id="dli_08_0096__li1076214590369">Test result<pre class="screen" id="dli_08_0096__screen1176217593369">"abc-def-ghi-jkl"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section089042532319"><a name="dli_08_0096__section089042532319"></a><a name="section089042532319"></a><h4 class="sectiontitle">HASH_CODE</h4><ul id="dli_08_0096__ul7890112517234"><li id="dli_08_0096__li158902257231">Function<p id="dli_08_0096__p88901254232"><a name="dli_08_0096__li158902257231"></a><a name="li158902257231"></a>Returns the absolute value of <strong id="dli_08_0096__b67661043125414">HASH_CODE()</strong> of a string. In addition to <strong id="dli_08_0096__b568954914542">string</strong>, <strong id="dli_08_0096__b10854145225411">int</strong>, <strong id="dli_08_0096__b5841135413542">bigint</strong>, <strong id="dli_08_0096__b680357175419">float</strong>, and <strong id="dli_08_0096__b3161591546">double</strong> are also supported.</p>
|
|
</li><li id="dli_08_0096__li689002562318">Syntax<pre class="screen" id="dli_08_0096__screen2890172515235">INT HASH_CODE(VARCHAR str)</pre>
|
|
</li><li id="dli_08_0096__li19890192552311">Parameters<ul id="dli_08_0096__ul4890192520237"><li id="dli_08_0096__li1389082542314"><strong id="dli_08_0096__b11878166155517">str</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li108914250238">Example<ul id="dli_08_0096__ul14934185923918"><li id="dli_08_0096__li593425916396">Test statement<pre class="screen" id="dli_08_0096__screen39344598397">SELECT HASH_CODE("abc");</pre>
|
|
</li><li id="dli_08_0096__li8934195903919">Test result<pre class="screen" id="dli_08_0096__screen149346592390">96354</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section870614420584"><a name="dli_08_0096__section870614420584"></a><a name="section870614420584"></a><h4 class="sectiontitle">INITCAP</h4><ul id="dli_08_0096__ul167063443588"><li id="dli_08_0096__li1706124416586">Function<p id="dli_08_0096__p107062445586"><a name="dli_08_0096__li1706124416586"></a><a name="li1706124416586"></a>Return the string whose first letter is in uppercase and the other letters in lowercase. Strings are sequences of alphanumeric characters separated by non-alphanumeric characters.</p>
|
|
</li><li id="dli_08_0096__li1970612442583">Syntax<pre class="screen" id="dli_08_0096__screen187061744185819">VARCHAR INITCAP(a)</pre>
|
|
</li><li id="dli_08_0096__li1670619444584">Parameters<ul id="dli_08_0096__ul670716445585"><li id="dli_08_0096__li157071344105811"><strong id="dli_08_0096__b19289195020559">a</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li1770692218310">Example<ul id="dli_08_0096__ul8706722035"><li id="dli_08_0096__li18706122339">Test statement<pre class="screen" id="dli_08_0096__screen11706102215312">SELECT INITCAP(var1)as aa FROM T1;</pre>
|
|
</li></ul>
|
|
<ul id="dli_08_0096__ul321510631919"><li id="dli_08_0096__li01911317121914">Test data and result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table11911117191918" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Test data and result</caption><thead align="left"><tr id="dli_08_0096__row11194141701913"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.2.4.2.1.1.2.3.1.1"><p id="dli_08_0096__p151941717111920">Test Data (var1)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.2.4.2.1.1.2.3.1.2"><p id="dli_08_0096__p6194417161911">Test Result (aa)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row181941174190"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.2.4.2.1.1.2.3.1.1 "><p id="dli_08_0096__p1419412179197">aBCde</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.2.4.2.1.1.2.3.1.2 "><p id="dli_08_0096__p141941417161916">Abcde</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section114504453324"><a name="dli_08_0096__section114504453324"></a><a name="section114504453324"></a><h4 class="sectiontitle">IS_ALPHA</h4><ul id="dli_08_0096__ul17450745133210"><li id="dli_08_0096__li74501453324">Function<p id="dli_08_0096__p17450194533218"><a name="dli_08_0096__li74501453324"></a><a name="li74501453324"></a>Checks whether a string contains only letters.</p>
|
|
</li><li id="dli_08_0096__li345024533217">Syntax<pre class="screen" id="dli_08_0096__screen15450045103212">BOOLEAN IS_ALPHA(VARCHAR content)</pre>
|
|
</li><li id="dli_08_0096__li12450124520322">Parameters<ul id="dli_08_0096__ul174501045133214"><li id="dli_08_0096__li245014516320"><strong id="dli_08_0096__b3106151665618">content</strong>: Enter a string.</li></ul>
|
|
</li><li id="dli_08_0096__li11307251412">Example<ul id="dli_08_0096__ul4301425343"><li id="dli_08_0096__li13302025642">Test statement<pre class="screen" id="dli_08_0096__screen123002513413">SELECT IS_ALPHA(content) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li1675616186555">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table1756131815513" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row10756518205518"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.10.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p18756111845517">Test Data (content)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.10.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p2075791815552">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row197575184555"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p97577184555">Abc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p1375781835518">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row6603253133013"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p19603175393013">abc1#$</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p260405323020">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row4569104863020"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p19569154853013">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p13569648193017">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1677584316307"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p137751043103019">Empty string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p107751143173016">false</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section11496210113613"><a name="dli_08_0096__section11496210113613"></a><a name="section11496210113613"></a><h4 class="sectiontitle">IS_DIGITS</h4><ul id="dli_08_0096__ul104961910133617"><li id="dli_08_0096__li1749691013362">Function<p id="dli_08_0096__p649618103360"><a name="dli_08_0096__li1749691013362"></a><a name="li1749691013362"></a>Checks whether a string contains only digits.</p>
|
|
</li><li id="dli_08_0096__li9496101073611">Syntax<pre class="screen" id="dli_08_0096__screen124961010193620">BOOLEAN IS_DIGITS(VARCHAR content)</pre>
|
|
</li><li id="dli_08_0096__li14971610173613">Parameters<ul id="dli_08_0096__ul54971210163613"><li id="dli_08_0096__li1449771018364"><strong id="dli_08_0096__b1393775710569">content</strong>: Enter a string.</li></ul>
|
|
</li><li id="dli_08_0096__li1316881010241">Example<ul id="dli_08_0096__ul151682010102414"><li id="dli_08_0096__li15168810142414">Test statement<pre class="screen" id="dli_08_0096__screen171685101244">SELECT IS_DIGITS(content) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li1870132211336">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table87011122173312" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row12702922183311"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p87020222335">Test Data (content)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p87021122193313">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row3702162218335"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p37021722173310">78</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p1702142212332">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row167021822193316"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p9703182217331">78.0</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p170392211334">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row770322214339"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p27031522183316">78a</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p37031022123310">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row870332219336"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p11703162214338">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p17035225336">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row11514537113511"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p85152037173513">Empty string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p651519371356">false</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section35411640163419"><a name="dli_08_0096__section35411640163419"></a><a name="section35411640163419"></a><h4 class="sectiontitle">IS_NUMBER</h4><ul id="dli_08_0096__ul354118405345"><li id="dli_08_0096__li1554144053413">Function<p id="dli_08_0096__p9541204012346"><a name="dli_08_0096__li1554144053413"></a><a name="li1554144053413"></a>This function is used to check whether a string is a numeric one.</p>
|
|
</li><li id="dli_08_0096__li10541104013411">Syntax<pre class="screen" id="dli_08_0096__screen6541940163420">BOOLEAN IS_NUMBER(VARCHAR content)</pre>
|
|
</li><li id="dli_08_0096__li9541134033413">Parameters<ul id="dli_08_0096__ul454114093419"><li id="dli_08_0096__li175417404348"><strong id="dli_08_0096__b2646154775710">content</strong>: Enter a string.</li></ul>
|
|
</li><li id="dli_08_0096__li1624172431618">Example<ul id="dli_08_0096__ul176241024171613"><li id="dli_08_0096__li6624132471613">Test statement<pre class="screen" id="dli_08_0096__screen18624142410162">SELECT IS_NUMBER(content) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li189591014406">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table108959109402" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row689661016402"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.12.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p989621019403">Test Data (content)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.12.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p178961104406">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row10897131010406"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p10897121019401">78</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p289711010407">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row889761016404"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p389861044015">78.0</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p15898810164011">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1898510164016"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p7898101014406">78a</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p1589819106406">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row13899181014018"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p19899110174014">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p1989914106404">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row689971020404"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p6899121012405">Empty string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.12.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p109002010134019">false</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section229175583720"><a name="dli_08_0096__section229175583720"></a><a name="section229175583720"></a><h4 class="sectiontitle">IS_URL</h4><ul id="dli_08_0096__ul7291155103717"><li id="dli_08_0096__li1329155515376">Function<p id="dli_08_0096__p5291165510379"><a name="dli_08_0096__li1329155515376"></a><a name="li1329155515376"></a>This function is used to check whether a string is a valid URL.</p>
|
|
</li><li id="dli_08_0096__li8291105583710">Syntax<pre class="screen" id="dli_08_0096__screen1229215593710">BOOLEAN IS_URL(VARCHAR content)</pre>
|
|
</li><li id="dli_08_0096__li42921655143715">Parameters<ul id="dli_08_0096__ul8292155143710"><li id="dli_08_0096__li1629275519379"><strong id="dli_08_0096__b7716122215581">content</strong>: Enter a string.</li></ul>
|
|
</li><li id="dli_08_0096__li1343911152718">Example<ul id="dli_08_0096__ul1143951152713"><li id="dli_08_0096__li4440171115273">Test statement<pre class="screen" id="dli_08_0096__screen24401211152714">SELECT IS_URL(content) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li1966213219447">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table966214204420" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row17662523449"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.13.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p16662182164418">Test Data (content)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.13.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p156638234419">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row1066382104415"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p066382184419">https://www.testweb.com</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p16663162124414">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row1966302144411"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p266316217441">https://www.testweb.com:443</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p12663629446">true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row56632218445"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p116632234415">www.testweb.com:443</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p06636216444">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row176631128448"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p156644215446">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p86648284410">false</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row866413274417"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p166641622443">Empty string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.13.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p126643215446">false</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section10302139205814"><a name="dli_08_0096__section10302139205814"></a><a name="section10302139205814"></a><h4 class="sectiontitle">JSON_VALUE</h4><ul id="dli_08_0096__ul169895020590"><li id="dli_08_0096__li29891804599">Function<p id="dli_08_0096__p352016422591"><a name="dli_08_0096__li29891804599"></a><a name="li29891804599"></a>Obtains the value of a specified path in a JSON string.</p>
|
|
</li><li id="dli_08_0096__li4675601108">Syntax<pre class="screen" id="dli_08_0096__screen18943134705">VARCHAR JSON_VALUE(VARCHAR content, VARCHAR path)</pre>
|
|
</li><li id="dli_08_0096__li11997183918016">Parameters<ul id="dli_08_0096__ul12598404116"><li id="dli_08_0096__li1721893813113"><strong id="dli_08_0096__b09111243205814">content</strong>: Enter a string.</li><li id="dli_08_0096__li1124043812111"><strong id="dli_08_0096__b16596144811581">path</strong>: path to be obtained.</li></ul>
|
|
</li><li id="dli_08_0096__li11885336183416">Example<ul id="dli_08_0096__ul19885133603416"><li id="dli_08_0096__li5886336113414">Test statement<pre class="screen" id="dli_08_0096__screen198861936123412">SELECT JSON_VALUE(content, path) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li15753161712472">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table3754717184710" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row1675421734717"><th align="left" class="cellrowborder" colspan="2" valign="top" id="mcps1.3.14.2.4.1.2.1.2.4.1.1"><p id="dli_08_0096__p1575541715478">Test Data (content and path)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" id="mcps1.3.14.2.4.1.2.1.2.4.1.2"><p id="dli_08_0096__p19755181710475">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row77551317134710"><td class="cellrowborder" valign="top" width="44.81%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p8755151774720">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.49%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p521710158499">$</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.2 "><p id="dli_08_0096__p17551617194716">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row187565177475"><td class="cellrowborder" valign="top" width="44.81%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p37568179478">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.49%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p12217215174911">$.a1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.2 "><p id="dli_08_0096__p137562017104719">v1</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row9756317134717"><td class="cellrowborder" valign="top" width="44.81%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p1275621717477">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.49%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p15217815114916">$.a4</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.2 "><p id="dli_08_0096__p27561517174718">{"a41":"v41","a42": ["v1","v2"]}</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row075719178474"><td class="cellrowborder" valign="top" width="44.81%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p1775711713471">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.49%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p12171315154916">$.a4.a42</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.2 "><p id="dli_08_0096__p1975741712475">["v1","v2"]</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row17571717134712"><td class="cellrowborder" valign="top" width="44.81%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p1757171713473">{ "a1":"v1","a2":7,"a3":8.0,"a4": {"a41":"v41","a42": ["v1","v2"]}}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.49%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.1 "><p id="dli_08_0096__p1721771517490">$.a4.a42[0]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.14.2.4.1.2.1.2.4.1.2 "><p id="dli_08_0096__p1275761774711">v1</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section281262819297"><a name="dli_08_0096__section281262819297"></a><a name="section281262819297"></a><h4 class="sectiontitle">KEY_VALUE</h4><ul id="dli_08_0096__ul881232892917"><li id="dli_08_0096__li188121728172912">Function<p id="dli_08_0096__p881212810291"><a name="dli_08_0096__li188121728172912"></a><a name="li188121728172912"></a>This function is used to obtain the value of a key in a key-value pair string.</p>
|
|
</li><li id="dli_08_0096__li1381214288296">Syntax<pre class="screen" id="dli_08_0096__screen188121284290">VARCHAR KEY_VALUE(VARCHAR content, VARCHAR split1, VARCHAR split2, VARCHAR key_name)</pre>
|
|
</li><li id="dli_08_0096__li681372819294">Parameters<ul id="dli_08_0096__ul188130289295"><li id="dli_08_0096__li16813162814295"><strong id="dli_08_0096__b878812215917">content</strong>: Enter a string.</li><li id="dli_08_0096__li192851348103118"><strong id="dli_08_0096__b129715337595">split1</strong>: separator of multiple key-value pairs.</li><li id="dli_08_0096__li2304104833118"><strong id="dli_08_0096__b599514855912">split2</strong>: separator between the key and value.</li><li id="dli_08_0096__li16325248113110"><strong id="dli_08_0096__b72450116018">key_name</strong>: name of the key to be obtained.</li></ul>
|
|
</li><li id="dli_08_0096__li92463396489">Example<ul id="dli_08_0096__ul424693917481"><li id="dli_08_0096__li17247143916482">Test statement<pre class="screen" id="dli_08_0096__screen5247193924818">SELECT KEY_VALUE(content, split1, split2, key_name) AS case_result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li997855325718">Test data and results
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table1197814531572" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Test data and results</caption><thead align="left"><tr id="dli_08_0096__row16979953145719"><th align="left" class="cellrowborder" colspan="4" valign="top" id="mcps1.3.15.2.4.1.2.1.2.6.1.1"><p id="dli_08_0096__p597905325714">Test Data (content, split1, split2, and key_name)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" id="mcps1.3.15.2.4.1.2.1.2.6.1.2"><p id="dli_08_0096__p129791053175718">Test Result (case_result)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row29792053195710"><td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p697912532577">k1=v1;k2=v2</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p5208018155913">;</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.95930406959304%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p0590157205914">=</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.42935706429357%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p131999135914">k1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.2 "><p id="dli_08_0096__p69797538575">v1</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row7979553175717"><td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p29791453135714">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p15208618155917">;</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.95930406959304%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p6590979594">=</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.42935706429357%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p72007119594">k1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.2 "><p id="dli_08_0096__p9980453185719">null</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_08_0096__row169808532576"><td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p14980165385716">k1=v1;k2=v2</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p2208121805915">null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.95930406959304%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p125907714595">=</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="6.42935706429357%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.1 "><p id="dli_08_0096__p102001316597">k1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.54604539546045%" headers="mcps1.3.15.2.4.1.2.1.2.6.1.2 "><p id="dli_08_0096__p139801853125711">null</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section1558193715588"><a name="dli_08_0096__section1558193715588"></a><a name="section1558193715588"></a><h4 class="sectiontitle">LOWER</h4><ul id="dli_08_0096__ul35817377587"><li id="dli_08_0096__li1958163717588">Function<p id="dli_08_0096__p7581203716583"><a name="dli_08_0096__li1958163717588"></a><a name="li1958163717588"></a>Returns a string of lowercase characters.</p>
|
|
</li><li id="dli_08_0096__li458193735819">Syntax<pre class="screen" id="dli_08_0096__screen65821437165815">VARCHAR LOWER(A)</pre>
|
|
</li><li id="dli_08_0096__li135821737105819">Parameters<ul id="dli_08_0096__ul20582437105810"><li id="dli_08_0096__li13582133735819"><strong id="dli_08_0096__b11357285010">A</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li105821237205815">Example<ul id="dli_08_0096__ul1224518505220"><li id="dli_08_0096__li4855191264319">Test statement<pre class="screen" id="dli_08_0096__screen7697113216435">SELECT LOWER(var1) AS aa FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li1353010421357">Test data and result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table853018429511" frame="border" border="1" rules="all"><caption><b>Table 11 </b>Test data and result</caption><thead align="left"><tr id="dli_08_0096__row125315426510"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.16.2.4.1.2.1.2.3.1.1"><p id="dli_08_0096__p5531342059">Test Data (var1)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.16.2.4.1.2.1.2.3.1.2"><p id="dli_08_0096__p1053117423512">Test Result (aa)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row15531742958"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.16.2.4.1.2.1.2.3.1.1 "><p id="dli_08_0096__p95315421511">ABc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.16.2.4.1.2.1.2.3.1.2 "><p id="dli_08_0096__p6531942952">abc</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section46291824203214"><a name="dli_08_0096__section46291824203214"></a><a name="section46291824203214"></a><h4 class="sectiontitle">LPAD</h4><ul id="dli_08_0096__ul126291124113212"><li id="dli_08_0096__li962912242324">Function<p id="dli_08_0096__p9342218123310"><a name="dli_08_0096__li962912242324"></a><a name="li962912242324"></a>Concatenates the pad string to the left of the str string until the length of the new string reaches the specified length len.</p>
|
|
</li><li id="dli_08_0096__li1629324193214">Syntax<pre class="screen" id="dli_08_0096__screen962952418320">VARCHAR LPAD(VARCHAR str, INT len, VARCHAR pad)</pre>
|
|
</li><li id="dli_08_0096__li7629152433213">Parameters<ul id="dli_08_0096__ul16630024143216"><li id="dli_08_0096__li763013241329"><strong id="dli_08_0096__b1393911555019">str</strong>: string before concatenation.</li><li id="dli_08_0096__li186302246322"><strong id="dli_08_0096__b199412011112">len</strong>: length of the concatenated string.</li><li id="dli_08_0096__li1860111385518"><strong id="dli_08_0096__b4489188414">pad</strong>: string to be concatenated.</li></ul>
|
|
<div class="note" id="dli_08_0096__note177841507416"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dli_08_0096__ul3342181815335"><li id="dli_08_0096__li872911018017">If any parameter is null, <strong id="dli_08_0096__b113892165110">null</strong> is returned.</li><li id="dli_08_0096__li183421318193311">If the value of len is a negative number, value <strong id="dli_08_0096__b4116121313110">null</strong> is returned.</li><li id="dli_08_0096__li17342161812332">If the value of <strong id="dli_08_0096__b338532273115">len</strong> is less than the length of <strong id="dli_08_0096__b338572253119">str</strong>, the first chunk of <strong id="dli_08_0096__b321219073618">str</strong> characters in <strong id="dli_08_0096__b13851722103118">len</strong> length is returned.</li></ul>
|
|
</div></div>
|
|
</li><li id="dli_08_0096__li13630524203215">Example<ul id="dli_08_0096__ul2417459155319"><li id="dli_08_0096__li108961947205313">Test statement<pre class="screen" id="dli_08_0096__screen1489644785318">SELECT
|
|
LPAD("adc", 2, "hello"),
|
|
LPAD("adc", -1, "hello"),
|
|
LPAD("adc", 10, "hello");</pre>
|
|
</li><li id="dli_08_0096__li489619475539">Test result<pre class="screen" id="dli_08_0096__screen14897747185311">"ad",,"helloheadc"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section5579173518713"><a name="dli_08_0096__section5579173518713"></a><a name="section5579173518713"></a><h4 class="sectiontitle">MD5</h4><ul id="dli_08_0096__ul175791335571"><li id="dli_08_0096__li057913352715">Function<p id="dli_08_0096__p35791359715"><a name="dli_08_0096__li057913352715"></a><a name="li057913352715"></a>Returns the MD5 value of a string. If the parameter is an empty string (that is, the parameter is <strong id="dli_08_0096__b62741234024">"</strong>), an empty string is returned.</p>
|
|
</li><li id="dli_08_0096__li157920359716">Syntax<pre class="screen" id="dli_08_0096__screen185798351276">VARCHAR MD5(VARCHAR str)</pre>
|
|
</li><li id="dli_08_0096__li17579335179">Parameters<ul id="dli_08_0096__ul957915351720"><li id="dli_08_0096__li105803358715"><strong id="dli_08_0096__b1006507215">str</strong>: string</li></ul>
|
|
</li><li id="dli_08_0096__li15580335573">Example<ul id="dli_08_0096__ul1060011331503"><li id="dli_08_0096__li139902053019">Test statement<pre class="screen" id="dli_08_0096__screen8990205904">SELECT MD5("abc");</pre>
|
|
</li><li id="dli_08_0096__li139354242020">Test result<pre class="screen" id="dli_08_0096__screen169359244017">"900150983cd24fb0d6963f7d28e17f72"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section16107161311363"><a name="dli_08_0096__section16107161311363"></a><a name="section16107161311363"></a><h4 class="sectiontitle">OVERLAY</h4><ul id="dli_08_0096__ul1810713138363"><li id="dli_08_0096__li15107713153618">Function<p id="dli_08_0096__p161071313183620"><a name="dli_08_0096__li15107713153618"></a><a name="li15107713153618"></a>Replaces the substring of <strong id="dli_08_0096__b569850439">x</strong> with <strong id="dli_08_0096__b48761120313">y</strong>. Replaces length+1 characters starting from <strong id="dli_08_0096__b77071611130">start_position</strong>.</p>
|
|
</li><li id="dli_08_0096__li20107111313362">Syntax<pre class="screen" id="dli_08_0096__screen14107191320369">VARCHAR OVERLAY ( (VARCHAR x PLACING VARCHAR y FROM INT start_position [ FOR INT length ]) )</pre>
|
|
</li><li id="dli_08_0096__li11077136366">Parameters<ul id="dli_08_0096__ul010831363618"><li id="dli_08_0096__li1610861315360"><strong id="dli_08_0096__b2822117638">x</strong>: string.</li><li id="dli_08_0096__li19108151343619"><strong id="dli_08_0096__b16835920735">y</strong>: string.</li><li id="dli_08_0096__li103041973514"><strong id="dli_08_0096__b86033240318">start_position</strong>: start position.</li><li id="dli_08_0096__li5682183925113"><strong id="dli_08_0096__b9391929436">length (optional)</strong>: indicates the character length.</li></ul>
|
|
</li><li id="dli_08_0096__li1810831316365">Example<ul id="dli_08_0096__ul1526674412561"><li id="dli_08_0096__li112661444195617">Test statement<pre class="screen" id="dli_08_0096__screen3663181114547">OVERLAY('abcdefg' PLACING 'xyz' FROM 2 FOR 2) AS result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li13266164418564">Test result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table9894165516108" frame="border" border="1" rules="all"><caption><b>Table 12 </b>Test result</caption><thead align="left"><tr id="dli_08_0096__row7894655161017"><th align="left" class="cellrowborder" valign="top" width="100%" id="mcps1.3.19.2.4.1.2.1.2.2.1.1"><p id="dli_08_0096__p889435591011">result</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row589415558101"><td class="cellrowborder" valign="top" width="100%" headers="mcps1.3.19.2.4.1.2.1.2.2.1.1 "><p id="dli_08_0096__p1689418551109">axyzdefg</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section174871931132317"><a name="dli_08_0096__section174871931132317"></a><a name="section174871931132317"></a><h4 class="sectiontitle">POSITION</h4><ul id="dli_08_0096__ul15487431142311"><li id="dli_08_0096__li148713112238">Function<p id="dli_08_0096__p848783122312"><a name="dli_08_0096__li148713112238"></a><a name="li148713112238"></a>Returns the position of the first occurrence of the target string <strong id="dli_08_0096__b069115488313">x</strong> in the queried string <strong id="dli_08_0096__b150015118313">y</strong>. If the target string <strong id="dli_08_0096__b16939185416315">x</strong> does not exist in the queried string <strong id="dli_08_0096__b982145812319">y</strong>, <strong id="dli_08_0096__b199551594313">0</strong> is returned.</p>
|
|
</li><li id="dli_08_0096__li1248833114238">Syntax<pre class="screen" id="dli_08_0096__screen114882031162317">INTEGER POSITION(x IN y)</pre>
|
|
</li><li id="dli_08_0096__li204881031162311">Parameters<ul id="dli_08_0096__ul648823112319"><li id="dli_08_0096__li7488163110233"><strong id="dli_08_0096__b1055616193410">x</strong>: string</li><li id="dli_08_0096__li7488103182316"><strong id="dli_08_0096__b36351821247">y</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li104881731192315">Example<ul id="dli_08_0096__ul6190111054313"><li id="dli_08_0096__li36279616437">Test statement<pre class="screen" id="dli_08_0096__screen84882315237">POSITION('in' IN 'chin') AS result FROM T1;</pre>
|
|
</li><li id="dli_08_0096__li144772481">Test result
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0096__table1166918550138" frame="border" border="1" rules="all"><caption><b>Table 13 </b>Test result</caption><thead align="left"><tr id="dli_08_0096__row5669125511317"><th align="left" class="cellrowborder" valign="top" width="100%" id="mcps1.3.20.2.4.1.2.1.2.2.1.1"><p id="dli_08_0096__p1366915550132">result</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_0096__row1867065531311"><td class="cellrowborder" valign="top" width="100%" headers="mcps1.3.20.2.4.1.2.1.2.2.1.1 "><p id="dli_08_0096__p11670105516136">3</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section1427510535106"><a name="dli_08_0096__section1427510535106"></a><a name="section1427510535106"></a><h4 class="sectiontitle">REPLACE</h4><ul id="dli_08_0096__ul1927505319101"><li id="dli_08_0096__li727555301018">Function<p id="dli_08_0096__p227610536103"><a name="dli_08_0096__li727555301018"></a><a name="li727555301018"></a>The string replacement function is used to replace all <strong id="dli_08_0096__b37991153519">str2</strong> in the <strong id="dli_08_0096__b155497555412">str1</strong> string with <strong id="dli_08_0096__b138177920519">str3</strong>.</p>
|
|
</li><li id="dli_08_0096__li027610532102">Syntax<pre class="screen" id="dli_08_0096__screen727665301014">VARCHAR REPLACE(VARCHAR str1, VARCHAR str2, VARCHAR str3)</pre>
|
|
</li><li id="dli_08_0096__li1276145351017">Parameters<ul id="dli_08_0096__ul027675312107"><li id="dli_08_0096__li427645371010"><strong id="dli_08_0096__b26591221358">str1</strong>: original character.</li><li id="dli_08_0096__li182769533109"><strong id="dli_08_0096__b2312152511519">str2</strong>: target character.</li><li id="dli_08_0096__li1398255413614"><strong id="dli_08_0096__b188321830657">str3</strong>: replacement character.</li></ul>
|
|
</li><li id="dli_08_0096__li12276145361019">Example<ul id="dli_08_0096__ul691101213100"><li id="dli_08_0096__li1691111241017">Test statement<pre class="screen" id="dli_08_0096__screen189181211016">SELECT
|
|
replace(
|
|
"hello world hello world hello world",
|
|
"world",
|
|
"hello"
|
|
);</pre>
|
|
</li><li id="dli_08_0096__li189181231012">Test result<pre class="screen" id="dli_08_0096__screen691161291018">"hello hello hello hello hello hello"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section24420324307"><a name="dli_08_0096__section24420324307"></a><a name="section24420324307"></a><h4 class="sectiontitle">RPAD</h4><ul id="dli_08_0096__ul12442153211300"><li id="dli_08_0096__li1244293218306">Function<p id="dli_08_0096__p1260182553118"><a name="dli_08_0096__li1244293218306"></a><a name="li1244293218306"></a>Concatenates the pad string to the right of the str string until the length of the new string reaches the specified length len.</p>
|
|
<ul id="dli_08_0096__ul761725193114"><li id="dli_08_0096__li165792016189">If any parameter is null, <strong id="dli_08_0096__b13555948951">null</strong> is returned.</li><li id="dli_08_0096__li196112251313">If the value of len is a negative number, value <strong id="dli_08_0096__b1112719451854">null</strong> is returned.</li><li id="dli_08_0096__li887629181917">The value of <strong id="dli_08_0096__b44814581352">pad</strong> is an empty string. If the value of <strong id="dli_08_0096__b19850721963">len</strong> is less than the length of <strong id="dli_08_0096__b174339613612">str</strong>, the string whose length is the same as the length of <strong id="dli_08_0096__b1658112611">str</strong> is returned.</li></ul>
|
|
</li><li id="dli_08_0096__li844313325301">Syntax<pre class="screen" id="dli_08_0096__screen1944313216305">VARCHAR RPAD(VARCHAR str, INT len, VARCHAR pad)</pre>
|
|
</li><li id="dli_08_0096__li12443143263010">Parameters<ul id="dli_08_0096__ul144363214305"><li id="dli_08_0096__li044320329302"><strong id="dli_08_0096__b192763301063">str</strong>: start string.</li><li id="dli_08_0096__li15102105812146"><strong id="dli_08_0096__b18713410618">len</strong>: length of the new string.</li><li id="dli_08_0096__li194431432173014"><strong id="dli_08_0096__b243320381367">pad</strong>: string that needs to be added repeatedly.</li></ul>
|
|
</li><li id="dli_08_0096__li1544318329305">Example<ul id="dli_08_0096__ul147481399171"><li id="dli_08_0096__li10748129181718">Test statement<pre class="screen" id="dli_08_0096__screen15748109171713">SELECT
|
|
RPAD("adc", 2, "hello"),
|
|
RPAD("adc", -1, "hello"),
|
|
RPAD("adc", 10, "hello");</pre>
|
|
</li><li id="dli_08_0096__li574913991712">Test result<pre class="screen" id="dli_08_0096__screen127491991712">"ad",,"adchellohe"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section595513321186"><a name="dli_08_0096__section595513321186"></a><a name="section595513321186"></a><h4 class="sectiontitle">SHA1</h4><ul id="dli_08_0096__ul9955932887"><li id="dli_08_0096__li1895515325810">Function<p id="dli_08_0096__p139553328817"><a name="dli_08_0096__li1895515325810"></a><a name="li1895515325810"></a>Returns the SHA1 value of the <strong id="dli_08_0096__b14529184477">expr</strong> string.</p>
|
|
</li><li id="dli_08_0096__li29550321384">Syntax<pre class="screen" id="dli_08_0096__screen179551132888">STRING SHA1(STRING expr)</pre>
|
|
</li><li id="dli_08_0096__li1495512322815">Parameters<ul id="dli_08_0096__ul1195518329812"><li id="dli_08_0096__li1695518324810"><strong id="dli_08_0096__b24939111779">expr</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li6956132983">Example<ul id="dli_08_0096__ul20942113118285"><li id="dli_08_0096__li1094212319282">Test statement<pre class="screen" id="dli_08_0096__screen1594253119286">SELECT SHA1("abc");</pre>
|
|
</li><li id="dli_08_0096__li69431231112812">Test result<pre class="screen" id="dli_08_0096__screen89431731202819">"a9993e364706816aba3e25717850c26c9cd0d89d"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section1742102714911"><a name="dli_08_0096__section1742102714911"></a><a name="section1742102714911"></a><h4 class="sectiontitle">SHA256</h4><ul id="dli_08_0096__ul7421142712910"><li id="dli_08_0096__li164221227791">Function<p id="dli_08_0096__p174225271792"><a name="dli_08_0096__li164221227791"></a><a name="li164221227791"></a>Returns the SHA256 value of the expr string.</p>
|
|
</li><li id="dli_08_0096__li6422132714910">Syntax<pre class="screen" id="dli_08_0096__screen04226271297">STRING SHA256(STRING expr)</pre>
|
|
</li><li id="dli_08_0096__li1342217271698">Parameters<ul id="dli_08_0096__ul1942214279917"><li id="dli_08_0096__li7422152710917"><strong id="dli_08_0096__b851873114711">expr</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li164231627691">Example<ul id="dli_08_0096__ul0231138143611"><li id="dli_08_0096__li122311813618">Test statement<pre class="screen" id="dli_08_0096__screen1723114816369">SELECT SHA256("abc");</pre>
|
|
</li><li id="dli_08_0096__li122318820366">Test result<pre class="screen" id="dli_08_0096__screen9231208173613">"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section2011913586245"><a name="dli_08_0096__section2011913586245"></a><a name="section2011913586245"></a><h4 class="sectiontitle">STRING_TO_ARRAY</h4><ul id="dli_08_0096__ul912035882414"><li id="dli_08_0096__li1912025852411">Function<p id="dli_08_0096__p51201958142410"><a name="dli_08_0096__li1912025852411"></a><a name="li1912025852411"></a>Separates the <strong id="dli_08_0096__b622119491171">value</strong> string as string arrays by using the delimiter.</p>
|
|
<div class="note" id="dli_08_0096__note3154256167"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_08_0096__p015414560615"><strong id="dli_08_0096__b64907437720">delimiter</strong> uses the Java regular expression. If special characters are used, they need to be escaped.</p>
|
|
</div></div>
|
|
</li><li id="dli_08_0096__li1612010588242">Syntax<pre class="screen" id="dli_08_0096__screen10120145892415">ARRAY[String] STRING_TO_ARRAY(STRING value, VARCHAR delimiter)</pre>
|
|
</li><li id="dli_08_0096__li101201758172414">Parameters<ul id="dli_08_0096__ul1212016588244"><li id="dli_08_0096__li101201558112417"><strong id="dli_08_0096__b15196857971">value</strong>: string.</li><li id="dli_08_0096__li24201503917"><strong id="dli_08_0096__b8385511882">delimiter</strong>: delimiter.</li></ul>
|
|
</li><li id="dli_08_0096__li13121195832419">Example<ul id="dli_08_0096__ul1460417291738"><li id="dli_08_0096__li20605629331">Test statement<pre class="screen" id="dli_08_0096__screen360520291834">SELECT
|
|
string_to_array("127.0.0.1", "\\."),
|
|
string_to_array("red-black-white-blue", "-");</pre>
|
|
</li><li id="dli_08_0096__li46051429532">Test result<pre class="screen" id="dli_08_0096__screen1260518291036">[127,0,0,1],[red,black,white,blue]</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section4366645154114"><a name="dli_08_0096__section4366645154114"></a><a name="section4366645154114"></a><h4 class="sectiontitle">SUBSTRING</h4><ul id="dli_08_0096__ul2366104594118"><li id="dli_08_0096__li133661245154117">Function<p id="dli_08_0096__p87601126184912"><a name="dli_08_0096__li133661245154117"></a><a name="li133661245154117"></a>Returns the substring that starts from a fixed position of A. The start position starts from 1.</p>
|
|
<ul id="dli_08_0096__ul18511812155017"><li id="dli_08_0096__li289010219511">If <strong id="dli_08_0096__b68316373509">len</strong> is not specified, the substring from the start position to the end of the string is truncated.</li><li id="dli_08_0096__li394317205016">If <strong id="dli_08_0096__b1428573215816">len</strong> is specified, the substring starting from the position specified by <strong id="dli_08_0096__b137151537983">start</strong> is truncated. The length is specified by <strong id="dli_08_0096__b14292441685">len</strong>.</li></ul>
|
|
<div class="note" id="dli_08_0096__note645945817511"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_08_0096__p5468195819512">The value of <strong id="dli_08_0096__b642745218817">start</strong> starts from <strong id="dli_08_0096__b1646713481381">1</strong>. If the value is <strong id="dli_08_0096__b48921959585">0</strong>, it is regarded as <strong id="dli_08_0096__b27561227894">1</strong>. If the value of start is a negative number, the position is calculated from the end of the string in reverse order.</p>
|
|
</div></div>
|
|
</li><li id="dli_08_0096__li1936714456415">Syntax<pre class="screen" id="dli_08_0096__screen53671045144119">VARCHAR SUBSTRING(STRING A <strong id="dli_08_0096__b89882413327">FROM</strong> INT start) </pre>
|
|
<p id="dli_08_0096__p1861924104711">Or</p>
|
|
<pre class="screen" id="dli_08_0096__screen12982740194713">VARCHAR SUBSTRING(STRING A <strong id="dli_08_0096__b1745819478324">FROM</strong> INT start <strong id="dli_08_0096__b111421545325">FOR</strong> INT len)</pre>
|
|
</li><li id="dli_08_0096__li18367845184117">Parameters<ul id="dli_08_0096__ul18367154594116"><li id="dli_08_0096__li73676458414"><strong id="dli_08_0096__b4307141099">A</strong>: specified string.</li><li id="dli_08_0096__li1836714514111"><strong id="dli_08_0096__b622815454910">start</strong>: start position for truncating the string <strong id="dli_08_0096__b888484718914">A</strong>.</li><li id="dli_08_0096__li128921332195310"><strong id="dli_08_0096__b50751293">len</strong>: intercepted length.</li></ul>
|
|
</li><li id="dli_08_0096__li133671445104113">Example<ul id="dli_08_0096__ul1779916341294"><li id="dli_08_0096__li12799143410912">Test statement 1<pre class="screen" id="dli_08_0096__screen17991934098">SELECT SUBSTRING("123456" FROM 2);</pre>
|
|
</li><li id="dli_08_0096__li148003341495">Test result 1<pre class="screen" id="dli_08_0096__screen1480033420916">"23456"</pre>
|
|
</li><li id="dli_08_0096__li13245039131715">Test statement 2<pre class="screen" id="dli_08_0096__screen12245113941719">SELECT SUBSTRING("123456" FROM 2 FOR 4);</pre>
|
|
</li><li id="dli_08_0096__li7245239161717">Test result 2<pre class="screen" id="dli_08_0096__screen13246103913172">"2345"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section84703469261"><a name="dli_08_0096__section84703469261"></a><a name="section84703469261"></a><h4 class="sectiontitle">TRIM</h4><ul id="dli_08_0096__ul847074662619"><li id="dli_08_0096__li94706467269">Function<p id="dli_08_0096__p2047044642612"><a name="dli_08_0096__li94706467269"></a><a name="li94706467269"></a>Remove A at the start position, or end position, or both the start and end positions from B. By default, string expressions A at both the start and end positions are removed.</p>
|
|
</li><li id="dli_08_0096__li10471184682619">Syntax<pre class="screen" id="dli_08_0096__screen847117468262">STRING TRIM( { BOTH | LEADING | TRAILING } STRING a FROM STRING b)</pre>
|
|
</li><li id="dli_08_0096__li14471154622615">Parameters<ul id="dli_08_0096__ul17471346192612"><li id="dli_08_0096__li17471246132617"><strong id="dli_08_0096__b156402481013">a</strong>: string.</li><li id="dli_08_0096__li154711846122612"><strong id="dli_08_0096__b15206108141016">b</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li15471164632611">Example<ul id="dli_08_0096__ul475023111156"><li id="dli_08_0096__li1175063131517">Test statement<pre class="screen" id="dli_08_0096__screen875023115155">SELECT TRIM(BOTH " " FROM " hello world ");</pre>
|
|
</li><li id="dli_08_0096__li675133181515">Test result<pre class="screen" id="dli_08_0096__screen375113117151">"hello world"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_0096__section19635513115615"><a name="dli_08_0096__section19635513115615"></a><a name="section19635513115615"></a><h4 class="sectiontitle">UPPER</h4><ul id="dli_08_0096__ul3635513115618"><li id="dli_08_0096__li1963515136560">Function<p id="dli_08_0096__p5635613125617"><a name="dli_08_0096__li1963515136560"></a><a name="li1963515136560"></a>Returns a string converted to an uppercase character.</p>
|
|
</li><li id="dli_08_0096__li13635121335618">Syntax<pre class="screen" id="dli_08_0096__screen1263531317566">VARCHAR UPPER(A)</pre>
|
|
</li><li id="dli_08_0096__li76361813195610">Parameters<ul id="dli_08_0096__ul196366130568"><li id="dli_08_0096__li46361130563"><strong id="dli_08_0096__b16908121871011">A</strong>: string.</li></ul>
|
|
</li><li id="dli_08_0096__li16365134567">Example<ul id="dli_08_0096__ul12969130121710"><li id="dli_08_0096__li596914081719">Test statement<pre class="screen" id="dli_08_0096__screen0969130111715">SELECT UPPER("hello world");</pre>
|
|
</li><li id="dli_08_0096__li13969190191712">Test result<pre class="screen" id="dli_08_0096__screen796910021714">"HELLO WORLD"</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_0086.html">Built-In Functions</a></div>
|
|
</div>
|
|
</div>
|
|
|