1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

The usage of UTL-match

Discussion in 'SQL PL/SQL' started by artistic21, Apr 20, 2014.

  1. artistic21

    artistic21 Active Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    80
    I want to test if two procedures are similar or no. Can you please help me ?
    Thanks in advance.
     
  2. ocprep

    ocprep Forum Advisor

    Messages:
    277
    Likes Received:
    76
    Trophy Points:
    410
    Location:
    Orlando, Florida
  3. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.

    UTL_MATCH


    Code (SQL):


    define str1 = shackleford
    define str2 =  shackelford

    SELECT '&str1' , '&str2' ,  UTL_MATCH.EDIT_DISTANCE ('&str1','&str2')  MATCH FROM   dual;

    SELECT '&str1' , '&str2' ,  UTL_MATCH.EDIT_DISTANCE_SIMILARITY ('&str1','&str2')  MATCH FROM   dual;

    SELECT '&str1' , '&str2' ,  UTL_MATCH.JARO_WINKLER ('&str1','&str2')  MATCH FROM   dual;

    SELECT '&str1' , '&str2' ,  UTL_MATCH.JARO_WINKLER_SIMILARITY ('&str1','&str2')  MATCH FROM   dual;

    SQL >

     
    'SHACKLEFORD' 'SHACKELFORD'      MATCH
    ------------- ------------- ----------
    shackleford   shackelford            2
     

    'SHACKLEFORD' 'SHACKELFORD'      MATCH
    ------------- ------------- ----------
    shackleford   shackelford           82


    'SHACKLEFORD' 'SHACKELFORD'      MATCH
    ------------- ------------- ----------
    shackleford   shackelford   0.98181818
     
    'SHACKLEFORD' 'SHACKELFORD'      MATCH
    ------------- ------------- ----------
    shackleford   shackelford           98