MySQL Forums
Forum List  »  Data Warehouse

Best Match using MySql
Posted by: Farhan Nisar
Date: December 27, 2009 09:51PM

Hi, I have two tables. One having a prefix and rates e.g.
Table Prefix
--------------
Rate Prefix
2 0513
2.5 051

Now the other table have a telephone number and i have to best match that number to get the right value of the rate (price). e.g If the number will be 051345678 then it should match the first value and give rate 2.
if the number will be 0514678967 then it should match with second option and give 2.5 as rate value. Can anyone please help me how to do this best match practice in mysql. Need the replies ASAP.



Edited 1 time(s). Last edit at 12/27/2009 11:06PM by Farhan Nisar.

Options: ReplyQuote


Subject
Views
Written By
Posted
Best Match using MySql
9062
December 27, 2009 09:51PM
5243
December 29, 2009 12:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.