User Tools

Site Tools

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

Sidebar

**HPL/SQL is included to Apache Hive since version 2.0** * [[home|Home]]\\ * [[why|Why HPL/SQL]]\\ * [[features|Key Features]]\\ * [[start|Get Started]]\\ * [[doc|HPL/SQL Reference]]\\ * [[download|Download]]\\ * [[new|What's New]]\\ * [[about|About]]

twopipes

====== String Concatenation || ====== 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:** HPL/SQL 0.1 See also: * [[concat|CONCAT Function]]