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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 comparing numbers string

Author  Topic 

ahmadjamalkhan
Starting Member

36 Posts

Posted - 2009-05-06 : 07:15:59
Hi

I have tableA , which has two columns , codes and price, I have another tableB , which has codes and prices

TableA
Codes, Prices
92 , 10
923 , 12
92300, 11

TableB
Codes, Prices
92 , 10
923 , 12
92300, 10
92333, 10
92345, 11

I want to compare these two tables in a way that if a code exist in one table like 92333 and 92345 which is not present in other , It should return the best match . For example like table A does not have 92333 it should look for best possible match which would be 923 .
and same for 92345 , it should look for best match which again would be 923 .

I will appreciate if someone can help me and put me in right direction.

Thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-05-06 : 07:50:08
Why do you open a new topic?
First thread is here : http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=124404


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

ahmadjamalkhan
Starting Member

36 Posts

Posted - 2009-05-06 : 07:57:41
aah ! sorry i thought that thread was closed!
Thanks I will keep an eye on both these threads. Hopefully I will get some more answeres.
Go to Top of Page
   

- Advertisement -