Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
aswindba1
Yak Posting Veteran
62 Posts |
Posted - 2013-07-03 : 13:52:53
|
I need update the AppID in table1 by comparing Table2. the data looks like below. Here the problem is AppNames in the both tables are not exactly same but technically they are same with partial match.Table1AppID||||AppnameNull ||||CSO Services OperationsNull |||| CSPNull ||||AAC Claims SystemsTable 2AppID|||||Appname1 |||||Corporate Services Operations(CSO)2 |||||Credit Servicing Portal(CSP)3 |||||American Assuarance Company (AAC) Claims SystemsPlease let me know how to get rid of this task.thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-03 : 15:00:39
|
Best approach is to create a mapping table with Appnames from both tables as per your relationship (Only you knows which values correspond to what) then use a join to it as a bridge to connect the two above tablesTrying to match on pattern search may not work well seeing how values exists( there's no consistency in value formats etc) . If you really want to do it you may need to do string splitting etc.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|