User Tools

Site Tools


Sidebar

HPL/SQL is included to Apache Hive since version 2.0

twopipes

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== String Concatenation || - PL/HQL Reference ====== You can use || operator to concatenate two or more strings. **Syntax:** <code> expr || expr [|| expr ...] </code> The result of the operation is always a string. If an operand is a number, it is implicitly converted to string before concatenation. If an operand is NULL, it is treated as an empty string '' in the concatenation. If all operands are NULL, the result is NULL. **Examples:** | **Concatenation** | **Result** | **Result Type** | | 'a' %%||%% 'b' %%||%% 'c' | 'abc' | String | | 'a' %%||%% 1 %%||%% 'c' | 'a1c' | String | | 'a' %%||%% NULL %%||%% 'c' | 'ac' | String | | NULL %%||%% NULL | NULL | String | **On-the-fly SQL Conversion** Hive does not support || operator, so PL/HQL automatically converts in to [[concat|CONCAT]] function in SQL SELECT statements. **Compatibility:** Oracle, IBM DB2, Teradata, PostgreSQL and Netezza **Version:** PL/HQL 0.1 See also: * [[concat|CONCAT Function]]