doc-exports/docs/dli/sqlreference/dli_08_0067.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

301 lines
42 KiB
HTML

<a name="dli_08_0067"></a><a name="dli_08_0067"></a>
<h1 class="topictitle1">Overview</h1>
<div id="body8662426"><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796834_en-us_topic_0093946912_a4eb9a9b304ea448e951ef2c47f18f371"><a href="#dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_t444697a01050479d88c575e8b9fe777d">Table 1</a> lists the string functions supported by DLI.</p>
<div class="tablenoborder"><a name="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_t444697a01050479d88c575e8b9fe777d"></a><a name="en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_t444697a01050479d88c575e8b9fe777d"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_t444697a01050479d88c575e8b9fe777d" frame="border" border="1" rules="all"><caption><b>Table 1 </b>String functions</caption><thead align="left"><tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r0c989dc7c0ab40b792c00e71d29b8a28"><th align="left" class="cellrowborder" valign="top" width="31.5065126566724%" id="mcps1.3.2.2.4.1.1"><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796834_en-us_topic_0093946912_abfe0d47e35bc4affa014a47155c9bb56">Syntax</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.16982059474072%" id="mcps1.3.2.2.4.1.2"><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796834_en-us_topic_0093946912_ac683ec8a51644d5594e147e17be71eb8">Value Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.323666748586874%" id="mcps1.3.2.2.4.1.3"><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796834_en-us_topic_0093946912_a511f207accc748b390d97221bc2d70b5">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r3b9b21092a214246a2967c31379da966"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p8437920461">ascii(string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aa2dfbff6eb3943f4814b680ab2fc9f94">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a9dbf39dae7504b1b97852d0a495baff9">Returns the numeric value of the first character in a string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r6f18faca4f4a4ead8aa9b73ee0d62788"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1284419303461">concat(array&lt;T&gt; &lt;a&gt;, array&lt;T&gt; &lt;b&gt;[,...]), concat(string &lt;str1&gt;, string &lt;str2&gt;[,...])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a538e33ff5fd041399a315792db13ca1e">ARRAY or STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a96f255bdaf9b400e8edb1b410f592fbd">Returns a string concatenated from multiple input strings. This function can take any number of input strings.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rcb471204d12b4d839afe78cd5dc46427"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p6727183813418">concat_ws(string &lt;separator&gt;, string &lt;str1&gt;, string &lt;str2&gt;[,...]), concat_ws(string &lt;separator&gt;, array&lt;string&gt; &lt;a&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ab5233b610808426ab87c873b4127a80f">ARRAY or STRUCT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aa4cc198f2be84d8592c7d5fd1fba3064">Returns a string concatenated from multiple input strings that are separated by specified separators.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row10206174510290"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p1040174541016">char_matchcount(string &lt;str1&gt;, string &lt;str2&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p17614243145012">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p06149431508">Returns the number of characters in str1 that appear in str2.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r2916b2cc24054a84ba77b43ae577b03a"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p20212163319137">encode(string &lt;str&gt;, string &lt;charset&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a320c4e45f6b74eafa1986f3b1d39f3f0">BINARY</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aa96ed8b2e42c4c52bc7f94f490859387">Returns strs encoded in charset format.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r5c5581afd7254269a8e8d6ed462c7823"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a6fd6b653fe0e458e8bd80c04a4cb0c7a">find_in_set(string &lt;str1&gt;, string &lt;str2&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a3f56535104a64c408d4d5890fd0419f0">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p17153173114188">Returns the position (stating from 1) of str1 in str2 separated by commas (,).</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r6d21bcb4c72d4a0ea158a05a0e1bd49e"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p54219102194">get_json_object(string &lt;json&gt;, string &lt;path&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a869c77aa8c57477fbb165b42b3d5558b">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aeb580feb70b74f88a794e06fcb634fea">Parses the JSON object in a specified JSON path. The function will return <strong id="dli_08_0067__en-us_topic_0000001702281549_b84865910379">NULL</strong> if the JSON object is invalid. </p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rbcf7128a3dc145789f79ac9f0fdbdfe0"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a34e05950eff642d18aee3a231f2377d0">instr(string &lt;str&gt;, string &lt;substr&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a51c12c5b04ee422888118e9b81dfce29">INT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a341a30cafb0f4825a67ec6969a940091">Returns the index of substr that appears earliest in str. Returns <strong id="dli_08_0067__en-us_topic_0000001702281549_b530916414525">NULL</strong> if either of the arguments are <strong id="dli_08_0067__en-us_topic_0000001702281549_b7290315135213">NULL</strong> and returns <strong id="dli_08_0067__en-us_topic_0000001702281549_b1914972195212">0</strong> if substr does not exist in str. Note that the first character in str has index 1.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row0430191019282"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1424356143720">instr1(string &lt;str1&gt;, string &lt;str2&gt;[, bigint &lt;start_position&gt;[, bigint &lt;nth_appearance&gt;]])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p16699172113910">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1611917543309">Returns the position of str2 in str1.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row1546121653212"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a0d967a3b6fa543158ceb0ec7db959384">initcap(string A)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a32dd6ff7cd8a46ff9ca13e380a1c9dc1">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a6fda89180369460fb472d41d362d2349">Converts the first letter of each word of a string to upper case and all other letters to lower case.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row674772125118"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1640792434317">keyvalue(string &lt;str&gt;,[string &lt;split1&gt;,string &lt;split2&gt;,] string &lt;key&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_p923181035114">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p19231410105111">Splits str by split1, converts each group into a key-value pair by split2, and returns the value corresponding to the key.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r1f9af645c6084072aa54d1556b35ef76"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p2436191994617">length(string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a5e8fd8bb1a264227ae71adc85b2bce9f">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aecfb1565808c41df96ac5be23856ecdd">Returns the length of a string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row1648712103620"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p39172422476">lengthb(string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p1344753984213">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p9448339144219">Returns the length of a specified string in bytes.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row24241892333"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a1d8dc9bfb82a45ab96c4ff3f3526eb62">levenshtein(string A, string B)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aab1b592232bd440285a79528b67ee8e6">INT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a5c60785291dd4a5dbdf558e5cacd3ab8">Returns the Levenshtein distance between two strings, for example, <strong id="dli_08_0067__en-us_topic_0000001702281549_b687520322115">levenshtein('kitten','sitting') = 3</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r083d4a5f9da84a569d0a8d3c04c15541"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p381164213514">locate(string &lt;substr&gt;, string &lt;str&gt;[, bigint &lt;start_pos&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aaa7ceb7f442847ca87df9a160777e91d">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_abfe714418f0044b590e1dcbc01e1ff5a">Returns the position of substr in str.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rf2fc5c0b57f94a09b2715c280f1f8e57"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aac5a42628271449ab061a4bd1b3a4da1">lower(string A) , lcase(string A)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_acfb89c4d63c049cf86d4382ab178c719">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a0d10287385cd4a1390586b464106fb4f">Converts all characters of a string to the lower case.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rd835b3a659b24717b18befc54c1d53de"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a9cbdd89cf1704680a68d5cd0b5b50f65">lpad(string &lt;str1&gt;, int &lt;length&gt;, string &lt;str2&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a0f8d2d8c971549419651c6ce5293d7e4">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aa306822c05e04f6f803b791907e8c690">Returns a string of a specified length. If the length of the given string (str1) is shorter than the specified length (length), the given string is left-padded with str2 to the specified length.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r00c3b3b367c5473fb690e05376200a47"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1852115219577">ltrim([&lt;trimChars&gt;,] string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a552a4d7087344d3cb837715919ca39e1">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ac9793cb81a30404da3ee1c550457ecf6">Trims spaces from the left hand side of a string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r02804c80def64040ac24558b0cc44208"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a6dacdc8c9915490eaeaf8da352fc43c4">parse_url(string urlString, string partToExtract [, string keyToExtract])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a091db466a6ae4cd694f9fdb2ea4a9678">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_p6151228617365">Returns the specified part of a given URL. Valid values of <strong id="dli_08_0067__en-us_topic_0000001702281549_b36672301165">partToExtract</strong> include <strong id="dli_08_0067__en-us_topic_0000001702281549_b63511948121611">HOST</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b1185244915161">PATH</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b818318519163">QUERY</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b17281155313166">REF</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b3782145413167">PROTOCOL</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b13198185615165">AUTHORITY</strong>, <strong id="dli_08_0067__en-us_topic_0000001702281549_b165621657111615">FILE</strong>, and <strong id="dli_08_0067__en-us_topic_0000001702281549_b4859135891611">USERINFO</strong>.</p>
<p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_p43840176173611">For example, <strong id="dli_08_0067__en-us_topic_0000001702281549_b7714182310171">parse_url('http://facebook.com/path1/p.php?k1=v1&amp;k2=v2#Ref1', 'HOST')</strong> returns <strong id="dli_08_0067__en-us_topic_0000001702281549_b103831736191717">'facebook.com'</strong>.</p>
<p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_p29182178173536">When the second parameter is set to <strong id="dli_08_0067__en-us_topic_0000001702281549_b12265730201812">QUERY</strong>, the third parameter can be used to extract the value of a specific parameter. For example, <strong id="dli_08_0067__en-us_topic_0000001702281549_b87375546171">parse_url('http://facebook.com/path1/p.php?k1=v1&amp;k2=v2#Ref1', 'QUERY', 'k1')</strong> returns <strong id="dli_08_0067__en-us_topic_0000001702281549_b7738115411172">'v1'</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r8a6149933efd4e069ea5e49336b1b640"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a6bffc38a855846cdbf611d24baea730a">printf(String format, Obj... args)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a66c4c348884049bbb2cb4eb07f182fac">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a853e6eac33fc4f77ad09fb5ddbcd9c1a">Prints the input in a specific format.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row9530133843719"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p178814191206">regexp_count(string &lt;source&gt;, string &lt;pattern&gt;[, bigint &lt;start_position&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_p207605401508">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1662914651016">Returns the number of substrings that match a specified pattern in the source, starting from the <strong id="dli_08_0067__en-us_topic_0000001702281549_b1923344132110">start_position</strong> position.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_redac72f9c5aa44c892a272845c477578"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p51911281311">regexp_extract(string &lt;source&gt;, string &lt;pattern&gt;[, bigint &lt;groupid&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_af0eb2faaf3084d2a96712aa97d76fa68">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p011317973211">Matches the string <strong id="dli_08_0067__en-us_topic_0000001702281549_b141063337200">source</strong> based on the <strong id="dli_08_0067__en-us_topic_0000001702281549_b1210763312202">pattern</strong> grouping rule and returns the string content that matches <strong id="dli_08_0067__en-us_topic_0000001702281549_b1010710336203">groupid</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row01902024153014"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1899518435215">replace(string &lt;str&gt;, string &lt;old&gt;, string &lt;new&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p242765342513">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p44271653102512">Replaces the substring that matches a specified string in a string with another string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r4f315c3ab38147d1b2ad2a56edb02f3a"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><ul id="dli_08_0067__en-us_topic_0000001702281549_ul14817544184211"><li id="dli_08_0067__en-us_topic_0000001702281549_li181994509422">For Spark 2.4.5: regexp_replace(string &lt;source&gt;, string &lt;pattern&gt;, string &lt;replace_string&gt;)</li><li id="dli_08_0067__en-us_topic_0000001702281549_li381714444213">For Spark 3.3.1: regexp_replace(string &lt;source&gt;, string &lt;pattern&gt;, string &lt;replace_string&gt;[, bigint &lt;occurrence&gt;])</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_afe7ac4d0e5234d388057aa1060dae772">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><ul id="dli_08_0067__en-us_topic_0000001702281549_ul1645927204311"><li id="dli_08_0067__en-us_topic_0000001702281549_li154590794316">For Spark 2.4.5: Replaces the substring that matches the pattern for the occurrence time in the source string and the substring that matches the pattern later with the specified string <strong id="dli_08_0067__en-us_topic_0000001702281549_b17495103818416">replace_string</strong> and returns the result string.</li><li id="dli_08_0067__en-us_topic_0000001702281549_li5510891432">For Spark 3.3.1: Replaces the substring that matches the pattern for the occurrence time in the source string and the substring that matches the pattern later with the specified string <strong id="dli_08_0067__en-us_topic_0000001702281549_b61211141772">replace_string</strong> and returns the result string.</li></ul>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row888933802811"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p29941324184411">regexp_replace1(string &lt;source&gt;, string &lt;pattern&gt;, string &lt;replace_string&gt;[, bigint &lt;occurrence&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p1563821216298">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p5549201515516">Replaces the substring that matches pattern for the occurrence time in the source string with the specified string <strong id="dli_08_0067__en-us_topic_0000001702281549_b17936111614811">replace_string</strong> and returns the result string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row17236235375"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p161031516114610">regexp_instr(string &lt;source&gt;, string &lt;pattern&gt;[,bigint &lt;start_position&gt;[, bigint &lt;occurrence&gt;[, bigint &lt;return_option&gt;]]])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p529394044312">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p8725124145012">Returns the start or end position of the substring that matches a specified pattern for the occurrence time, starting from <strong id="dli_08_0067__en-us_topic_0000001702281549_b169911257912">start_position</strong> in the source string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row4882220105114"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p186192715475">regexp_substr(string &lt;source&gt;, string &lt;pattern&gt;[, bigint &lt;start_position&gt;[, bigint &lt;occurrence&gt;]])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p1013374212318">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p7486165844617">Returns the substring that matches a specified pattern for the occurrence time, starting from <strong id="dli_08_0067__en-us_topic_0000001702281549_b234283720109">start_position</strong> in the source string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r3964db137aed40d99e65717d0355bf55"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p10591637154715">repeat(string &lt;str&gt;, bigint &lt;n&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_abeb2a70355a543f8ba95cdf9e36ef8a2">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a5f89dc78170d408f87b764852e6ef5e5">Repeats a string for <em id="dli_08_0067__en-us_topic_0000001702281549_i1735512111110">N</em> times.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r8a17e163387d47a1a5f244c48f63c672"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ab133ce03b9d54315bc86ca55f3cc4713">reverse(string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ada3cb7a93401465f8ee253f46f8d6714">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a9526eefcc8c44cd790cc1de58c0d82a2">Returns a string in reverse order.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r6a850e8103a741ddb6b09ad41b37490c"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p574215322492">rpad(string &lt;str1&gt;, int &lt;length&gt;, string &lt;str2&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a8338b91aec9a4505be02fc0c285b41f5">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_acacf5f2edbf24e04aebbbb6fdfdf5c4f">Right-pads str1 with str2 to the specified length.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r7bf278e1c7e546df9e3772980208c483"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p7429101455118">rtrim([&lt;trimChars&gt;, ]string &lt;str&gt;),</p>
<p id="dli_08_0067__en-us_topic_0000001702281549_p203543825210">rtrim(trailing [&lt;trimChars&gt;] from &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aaf92ab4a52144b2d858ef23f81805644">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a5c8f7ac2159940d38ec0a587a97920ee">Trims spaces from the right hand side of a string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row101861035173313"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a2ad272a717954caba09b3973a1bc785c">soundex(string &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ad16560aeca1d4f8a877799c1f767dbe3">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ab8231d38cfc84c369e37dce6b04db162">Returns the soundex string from str, for example, <strong id="dli_08_0067__en-us_topic_0000001702281549_b19617191311613">soundex('Miller') = M460</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rafc56045baca477fb4f889944d3d1be4"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a775545c2651a411ea7184db6725a2169">space(bigint &lt;n&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a1ccf69ea0da8440dabf36a4d5af5c9ac">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_acd89a923d2eb415a9a067c8ce91bf84a">Returns a specified number of spaces.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_rfaf96a6b94db4add8123ef7b7bdf0967"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p184240443549">substr(string &lt;str&gt;, bigint &lt;start_position&gt;[, bigint &lt;length&gt;]), substring(string &lt;str&gt;, bigint &lt;start_position&gt;[, bigint &lt;length&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a275c30e4297349dba0648b89b5a1cdc1">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_adbd5a23035c84eddbd41a2d1c1c5cce1">Returns the substring of str, starting from <strong id="dli_08_0067__en-us_topic_0000001702281549_b11421542192016">start_position</strong> and with a length of <strong id="dli_08_0067__en-us_topic_0000001702281549_b19393175211201">length</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r37abecd94fbb442e83a441c84e2478ee"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p1186723055619">substring_index(string &lt;str&gt;, string &lt;separator&gt;, int &lt;count&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a60779562c7024f64bfe37a88e1ec5409">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ae4103c3337994b5ea041ce0cb64f407b">Truncates the string before the <strong id="dli_08_0067__en-us_topic_0000001702281549_b1622163917239">count</strong> separator of str. If the value of <strong id="dli_08_0067__en-us_topic_0000001702281549_b981818443233">count</strong> is positive, the string is truncated from the left. If the value of <strong id="dli_08_0067__en-us_topic_0000001702281549_b1488175912233">count</strong> is negative, the string is truncated from the right.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_row1583513582358"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p162136125716">split_part(string &lt;str&gt;, string &lt;separator&gt;, bigint &lt;start&gt;[, bigint &lt;end&gt;])</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_p1921601153415">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_p15660132725712">Splits a specified string based on a specified separator and returns a substring from the start to end position.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r213fd4a840fe41fb98dee8f56e4a6ecc"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a47b1f75d0c114139b21a067cd25bffff">translate(string|char|varchar input, string|char|varchar from, string|char|varchar to)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a1648a5aed6674beebe7cb1ce319db8c8">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_ae390667d121346bbb8996a9ed3ccfd5f">Translates the input string by replacing the characters or string specified by <strong id="dli_08_0067__en-us_topic_0000001702281549_b136239287257">from</strong> with the characters or string specified by <strong id="dli_08_0067__en-us_topic_0000001702281549_b19732130152514">to</strong>. For example, replaces <strong id="dli_08_0067__en-us_topic_0000001702281549_b74992472259">bcd</strong> in <strong id="dli_08_0067__en-us_topic_0000001702281549_b744895718259">abcde</strong> with <strong id="dli_08_0067__en-us_topic_0000001702281549_b135711408266">BCD</strong> using <strong id="dli_08_0067__en-us_topic_0000001702281549_b556783220259">translate("abcde", "bcd", "BCD")</strong>.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r93c13fc217e14308a94c7c2799db8beb"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_p113912551582">trim([&lt;trimChars&gt;,]string &lt;str&gt;),</p>
<p id="dli_08_0067__en-us_topic_0000001702281549_p2044517474588">trim([BOTH] [&lt;trimChars&gt;] from &lt;str&gt;)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a66d58e37e84d441792699696398f3a1d">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a82079fd6743f4d78866530f3254f045e">Trims spaces from both ends of a string.</p>
</td>
</tr>
<tr id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_r3ffc683b75794fba80aa7ec6808c74fb"><td class="cellrowborder" valign="top" width="31.5065126566724%" headers="mcps1.3.2.2.4.1.1 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_aad2e6019f04446468137cc7b5ed20dc0">upper(string A), ucase(string A)</p>
</td>
<td class="cellrowborder" valign="top" width="11.16982059474072%" headers="mcps1.3.2.2.4.1.2 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a7911f250c3f442809ea472c5c0e67635">STRING</p>
</td>
<td class="cellrowborder" valign="top" width="57.323666748586874%" headers="mcps1.3.2.2.4.1.3 "><p id="dli_08_0067__en-us_topic_0000001702281549_en-us_topic_0206796884_en-us_topic_0093947002_a1f68d92346be4ba487ee7be113ee97a1">Converts all characters of a string to the upper case.</p>
</td>
</tr>
</tbody>
</table>
</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>