Difference between revisions of "SUBSTR()"

From Lianjapedia
Jump to: navigation, search
m (Text replace - "Recital" to "Lianja")
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to perform substring extraction
 
Function to perform substring extraction
 
  
 
==Syntax==
 
==Syntax==
 
SUBSTR(<expC> | <memofield>, <expN1> [,<expN2>])
 
SUBSTR(<expC> | <memofield>, <expN1> [,<expN2>])
 
  
 
==See Also==
 
==See Also==
 
[[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRSTR()]], [[STRTRAN()]], [[STUFF()]]
 
[[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRSTR()]], [[STRTRAN()]], [[STUFF()]]
 
  
 
==Description==
 
==Description==
 
The SUBSTR() function extracts a substring from <expC> or <memofield> starting at position <expN1> of width <expN2>.  If <expN1> is negative, the extraction starts from the right side of the string.  If <expN2> is omitted, a substring will be extracted up to the end of <expC>.  When used in conjunction with the AT() function, the SUBSTR() function is very useful for extracting selected information from character strings.
 
The SUBSTR() function extracts a substring from <expC> or <memofield> starting at position <expN1> of width <expN2>.  If <expN1> is negative, the extraction starts from the right side of the string.  If <expN2> is omitted, a substring will be extracted up to the end of <expC>.  When used in conjunction with the AT() function, the SUBSTR() function is very useful for extracting selected information from character strings.
 
  
 
==Example==
 
==Example==
Line 21: Line 17:
 
Gary T West
 
Gary T West
 
</code>
 
</code>
 
  
 
==Products==
 
==Products==

Revision as of 11:16, 12 December 2012

Purpose

Function to perform substring extraction

Syntax

SUBSTR(<expC> | <memofield>, <expN1> [,<expN2>])

See Also

AT(), ATNEXT(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), SET STRESCAPE, STR(), STREXTRACT(), STRSTR(), STRTRAN(), STUFF()

Description

The SUBSTR() function extracts a substring from <expC> or <memofield> starting at position <expN1> of width <expN2>. If <expN1> is negative, the extraction starts from the right side of the string. If <expN2> is omitted, a substring will be extracted up to the end of <expC>. When used in conjunction with the AT() function, the SUBSTR() function is very useful for extracting selected information from character strings.

Example

m_usrname = "GTW  , Gary T West  "
? substr(m->m_usrname,at(",",m->m_usrname)+1)
Gary T West

Products

Lianja Server, Lianja