Results 1 to 4 of 4

Thread: Position of string in a list of strings - Informatica Indexof function

  1. #1
    Senior Member vijay's Avatar
    Join Date
    May 2012
    Location
    Hyderabad
    Posts
    515

    Position of string in a list of strings - Informatica Indexof function

    The syntax of IndexOf functions is shown below:

    Code:
    IndexOf(search-string, string1, string2, string3,......, case_flag)
    The indexof function is to find the position of the search-string in the specified list of strings. You can pass as many strings as you want for the list.

    If case_flag is 0, then the search is case insensitive. Any other integer means, the search is case sensitive.

    Example:

    Code:
    indexof('ETL', 'Informatica','Power Center','ETL') returns 3.
    In the above example, the String ETL is searched against the list of strings 'Informatica','Power Center','ETL'. The index starts from 1.

    Eample for case insensitive search:

    Code:
    indexof('oracle','mysql','ORACLE','postGres',0) returns 2.

  2. #2
    EKT
    EKT is offline
    Junior Member
    Join Date
    Feb 2015
    Posts
    2

    Indexof function

    What would the return value for the following expression be?

    indexof('Informatica ETL', 'Informatica','Power Center','ETL')

    Is it 1, 3 or 0?

    Thanks!



    Quote Originally Posted by vijay View Post
    The syntax of IndexOf functions is shown below:

    Code:
    IndexOf(search-string, string1, string2, string3,......, case_flag)
    The indexof function is to find the position of the search-string in the specified list of strings. You can pass as many strings as you want for the list.

    If case_flag is 0, then the search is case insensitive. Any other integer means, the search is case sensitive.

    Example:

    Code:
    indexof('ETL', 'Informatica','Power Center','ETL') returns 3.
    In the above example, the String ETL is searched against the list of strings 'Informatica','Power Center','ETL'. The index starts from 1.

    Eample for case insensitive search:

    Code:
    indexof('oracle','mysql','ORACLE','postGres',0) returns 2.

  3. #3
    Senior Member vijay's Avatar
    Join Date
    May 2012
    Location
    Hyderabad
    Posts
    515
    As the search string didn't match with anyone of the given strings, It returns 0

  4. #4
    EKT
    EKT is offline
    Junior Member
    Join Date
    Feb 2015
    Posts
    2
    Thanks for the reply. That is what I thought, but it is this post https://community.informatica.com/docs/DOC-1719that confused me.

Similar Threads

  1. Concat multiple strings in informatica
    By vijay in forum Data Warehouse
    Replies: 1
    Last Post: 03-04-2013, 07:35 AM
  2. Replies: 0
    Last Post: 03-04-2013, 07:11 AM
  3. Replies: 1
    Last Post: 06-14-2012, 10:31 AM
  4. How to sort list of strings using pointers in C++?
    By Bandhavi in forum Programming languages
    Replies: 1
    Last Post: 06-08-2012, 08:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •