SubField - script and chart function
SubField() is used to extract substring components from a parent string field, where the original record fields consist of two or more parts separated by a delimiter.
The Subfield() function can be used, for example, to extract first name and surname from a list of records consisting of full names, the component parts of a path name, or for extracting data from comma-separated tables.
If you use the Subfield() function in a LOAD statement with the optional
Syntax:
SubField(text, delimiter[, field_no ])
Return data type: string
Arguments:
Argument | Description |
---|---|
|
The original string. This can be a hard-coded text, a variable, a dollar-sign expansion, or another expression. |
|
A character within the input text that divides the string into component parts. |
|
The optional third argument is an integer that specifies which of the substrings of the parent string text is to be returned. Use the value 1 to return the first substring, 2 to return the second substring, and so on.
|