Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:sql:functions:substring [2009/12/06 22:38]
tdo
dev:sql:functions:substring [2012/10/26 14:28] (current)
Line 29: Line 29:
  
 ===== Example ===== ===== Example =====
-==== Example 1 ====+==== Example 1: Substring of column ​====
 <code SQL> <code SQL>
-select product_no,+  > select product_no,
 SUBSTRING(PRODUCTS.PRODUCT_NO FROM 2 FOR 3) as Sub1,  SUBSTRING(PRODUCTS.PRODUCT_NO FROM 2 FOR 3) as Sub1, 
 SUBSTRING(PRODUCTS.PRODUCT_NO FROM 5) as Sub2 SUBSTRING(PRODUCTS.PRODUCT_NO FROM 5) as Sub2
Line 40: Line 40:
  ​ASUP93541 ​        ​SUP ​       93541  ​ASUP93541 ​        ​SUP ​       93541
  ​BPRI54687 ​        ​PRI ​       54687  ​BPRI54687 ​        ​PRI ​       54687
 +</​code>​
 +==== Example 2: Substring of '​string'​ ====
 +<code SQL>
 +  > SELECT SUBSTRING ('My String'​ from 4) from $omnidex
  
 +SUBSTR
 +------
 +String
 </​code>​ </​code>​
  
  
 {{page>:​bottom_add&​nofooter&​noeditbtn}} {{page>:​bottom_add&​nofooter&​noeditbtn}}
 
Back to top
dev/sql/functions/substring.1260139099.txt.gz ยท Last modified: 2012/10/26 14:27 (external edit)