Differences

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

Link to this comparison view

dev:sql:functions:substring [2009/12/06 22:27]
tdo
dev:sql:functions:substring [2016/06/28 22:38]
Line 1: Line 1:
-{{page>:​top_add&​nofooter&​noeditbtn}} 
-<​html><​div align="​center"><​span style="​color:​red">​DRAFT</​span></​div></​html>​ 
-====== Omnidex SQL Function: SUBSTRING ====== 
-{{page>:​sql_bar&​nofooter&​noeditbtn}} 
-===== Description ===== 
-The SUBSTRING function returns a new character string that is a portion of another column or string. ​ 
  
-The new string begins at the specified starting point in the original column or string and extends the number of characters specified in the length parameter. If the length parameter is omitted, the new string extends to the end of the original string. 
- 
-The return data type is C STRING. 
- 
-===== Syntax ===== 
-  SUBSTRING( <​column_spec | '​string'​ FROM start_no [ FOR length ])) 
- 
-== < column_spec | '​string'​ >== 
- 
-Required. This is the string that contains the characters that will be returned. 
- 
-== FROM == 
- 
-The FROM keyword is required. 
- 
-== start_no == 
- 
-Required. start is an integer indicating the position of the first character relative to 1 that will be returned. 
- 
-== FOR length == 
- 
-Optional. This indicates the number of characters after and including the start character, that will be returned. If omitted, all of the remaining characters after and including the start character will be returned. 
-===== Example ===== 
-==== Example 1 ==== 
-<code SQL> 
-select product_no, 
-SUBSTRING(PRODUCTS.PRODUCT_NO FROM 2 FOR 3) as Sub1,  
-SUBSTRING(PRODUCTS.PRODUCT_NO FROM 5) as Sub2 
-from products 
- 
- ​Product_No ​       Sub1       Sub2 
- 
- ​ASUP93541 ​        ​SUP ​       93541 
- ​BPRI54687 ​        ​PRI ​       54687 
- 
-</​code>​ 
- 
- 
-{{page>:​bottom_add&​nofooter&​noeditbtn}} 
 
Back to top
dev/sql/functions/substring.txt ยท Last modified: 2016/06/28 22:38 (external edit)