SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to join data on similar string patterns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rasta
Starting Member

23 Posts

Posted - 11/06/2012 :  11:27:59  Show Profile  Reply with Quote
I m trying to join data based on similar strings such as the following:

SELECT p1.*,p2.*
FROM TAB1 p1
FULL OUTER JOIN TAB2 p2
ON p1.name = p2.name

However, data join only in the case the strings are exactly the same, but will not join if differs, e.g. in the following.
p1.name = 'OLOM production'
p2.name = 'com-OLOM s'

Is it possible to match such cases where only part of the strings match?

Thanks.

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/06/2012 :  12:05:46  Show Profile  Reply with Quote
you need to use some kind of fuzzy matching algorithm for that and also dofew trials before you understand quality of data you're interested in

see

https://sites.google.com/site/sqlblindman/fuzzysearchalgorithm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000