August 24, 2011 at 11:33 pm
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.
August 25, 2011 at 5:14 pm
You could always do a join on LIKE with a trailing wild-card.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply