Substring Oracle Integration Cloud

Share

Substring Oracle Integration Cloud

  1. 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:

    1. Extract a substring starting from the 4th character to the end of the string: SUBSTRING(‘Hello World’, 4) — Output: ‘lo World’
    2. Extract a substring starting from the 7th character with a length of 3 characters: SUBSTRING(‘Hello World’, 7, 3) — Output: ‘Wor’
    3. Extract a substring starting from the 2nd character to the end of the string: SUBSTRING(‘Integration’, 2) — Output: ‘ntegration’
    4. Extract a single character from a string (e.g., the 5th character): SUBSTRING(‘ABCDE’, 5, 1) — Output: ‘E’

Share

Leave a Reply

Your email address will not be published. Required fields are marked *