Substring Oracle Integration Cloud
In Oracle Integration Cloud (OIC), you can use the SUBSTRING function to extract a portion of a string. The SUBSTRING function is often used in expressions and mappings to manipulate data within integrations. Here’s the syntax for the SUBSTRING function in OIC:
SUBSTRING(string_expression, start_position, length)
- string_expression: The source string from which you want to extract a substring.
- start_position: The position within the source string where you want to start extracting the substring. It is a numeric value, and the counting starts from 1.
- length (optional): The number of characters to extract from the source string. If not specified, it will extract characters from the start_position to the end of the string.
Here are some examples of how to use the SUBSTRING function in Oracle Integration Cloud:
- Extract a substring starting from the 4th character to the end of the string: SUBSTRING(‘Hello World’, 4) — Output: ‘lo World’
- Extract a substring starting from the 7th character with a length of 3 characters: SUBSTRING(‘Hello World’, 7, 3) — Output: ‘Wor’
- Extract a substring starting from the 2nd character to the end of the string: SUBSTRING(‘Integration’, 2) — Output: ‘ntegration’
- Extract a single character from a string (e.g., the 5th character): SUBSTRING(‘ABCDE’, 5, 1) — Output: ‘E’