replace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

replace [2016/03/03 10:12] (current)
dmtolpeko created
Line 1: Line 1:
 +====== REPLACE Function - HPL/SQL Reference======
  
 +REPLACE function replaces all occurrences of the specified substring with another substring. ​
 +
 +**Syntax**:
 +
 +<code language="​sql">​
 +REPLACE(string,​ what, with)
 +</​code>​
 +
 +**Parameters:​**
 +
 +| **Parameter** | **Type** | **Value** | **Description** |
 +| //string// | String | Variable or expression | Original string |
 +| //what// | String | Variable or expression | Which substring to replace |
 +| //with// | String | Variable or expression | Replacement |
 +
 +
 +**Return Type:**
 +
 +String.
 +
 +**Example:​**
 +
 +<code language="​sql">​
 +replace('​2016-03-03',​ '​-',​ ''​);​
 +--
 +20160303 ​
 +</​code> ​
 +
 +**Compatibility**:​ Oracle, Microsoft SQL Server, IBM DB2 and MySQL.
 +
 +**Version**:​ HPL/SQL 0.3.17