The SUBSTR function is similar to the SCAN function. Here is a brief comparison.
Both the SCAN and SUBSTR functions can extract a substring from a character value:
• SCAN extracts words within a value that is marked by delimiters.
Example
• SUBSTR extracts a portion of a value by starting at a specified location.
-The SUBSTR function is best used when you know the exact position of the string that
you want to extract from the character value.
Example
the SCAN function is best used during the following actions:
• You know the order of the words in the character value.
• The starting position of the words varies.
• The words are marked by some delimiter.
SCAN versus SUBSTR Functions
Reviewed by Nitesh Kumar Khichi
on
November 23, 2023
Rating:
No comments: