Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    7

    Unanswered: match identical parts in two strings

    Hello
    I have a table from user with some data that I have to match to our data.
    he has code_id column that i have to match to our code_id column.

    Only the problem I come up with is that his code_id not 100% matches to our code_id.

    Meening:

    our a.code_id = '830197456782'
    user aa.code_id = '3019745678'

    How to match identical parts in order to compare data?

    SELECT
    trim(SUBSTR(lpad(a.code_id,12),
    LENGTH(lpad(aa.code_id,12))-3))
    FROM a , aa
    ???


    Thank you

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    use INSTR function

  3. #3
    Join Date
    Oct 2003
    Location
    ny
    Posts
    23
    Originally posted by anacedent
    use INSTR function
    im stuck, please help me out
    thank you

  4. #4
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    PHP Code:
    select instr'ABCDE''BC'  from dual
    Result 2

    select instr
    'ABCDE''DE'  from dual
    Result 4

    select instr
    'ABCDE''ABC'  from dual
    Result 1

    select instr
    'ABCDE''XYZ'  from dual
    Result 0

    select 
    *
    from table
    where instr
    'bigcolum''littlecolum' ) > 
    I don't intend to sound rude, but Anacadent's 'INSTR' reply was correct, INSTR is fully documented in the manuals available at www.oracle.com

    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

  5. #5
    Join Date
    Oct 2003
    Location
    ny
    Posts
    23
    Originally posted by billm
    PHP Code:
    select instr'ABCDE''BC'  from dual
    Result 2

    select instr
    'ABCDE''DE'  from dual
    Result 4

    select instr
    'ABCDE''ABC'  from dual
    Result 1

    select instr
    'ABCDE''XYZ'  from dual
    Result 0

    select 
    *
    from table
    where instr
    'bigcolum''littlecolum' ) > 
    I don't intend to sound rude, but Anacadent's 'INSTR' reply was correct, INSTR is fully documented in the manuals available at www.oracle.com

    Hth
    Bill

    thank you

Posting Permissions

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