urgent Help required in Fuzzy matching using sql server

  • I have two tables

    Table A: property_id caseno

    100 11-123456-gg

    101 22-254-ju

    103 55-5698

    Table B: property_id caseno

    100 11-123456-gg

    101 22-254

    103 55-5698

    I want to retrieve the property_id from the table A by matching the caseno columns in both the tables .

    Following are the conditions to retrieve property_id from Table A.

    1)First we have to match the whole caseno of Table A with Table B.

    2)If the whole caseno is not matching then we have to do fuzzy matching i.e., we have to take upto second '-' to match both the caseno in tables.

    Fuzzy Matching Example: Table A Table B

    22-254-ju 22-254 Match

    Note:There is no guarentee that the caseno have the sencond '-' character in caseno in both the tables.

  • You could always do a join on LIKE with a trailing wild-card.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply