3 messages in com.mysql.lists.win32String comparison question
FromSent OnAttachments
Helmar Rudolph22 Jul 2002 05:41 
jbon...@sola.com.au24 Jul 2002 16:05 
Helmar Rudolph25 Jul 2002 08:50 
Subject:String comparison question
From:Helmar Rudolph (hel@sonork.com)
Date:07/22/2002 05:41:20 AM
List:com.mysql.lists.win32

Hello!

I have a problem in MySQL. I am looking for a way to compare two binary strings and count the number of matches.

Example: match string = 1 string1 = 001110110101001 string2 = 011010010000001 matches = ^ ^ ^ ^ Count = 4

I need to get the number of matches to calculate a certain relevance, because I need results even if the strings aren't exactly matching.

The binary strings are results of padded "integer to binary" conversion of a numerical string (a combination value of 1,2,4,8,16,....), in which I store a facility value (fireplace=1,swimming pool=2,bike hire=4, conference room=8, ....) of an object.

Is this possible to do in MySQL?

Any help would be greatly appreciated.

Helmar

-- Sonork SRL | Enterprise Instant Messaging Software http://www.sonork.com - hel@sonork.com Tel: +27.21.794.3414 - Sonork ID: 0.12

-------------------------------------------------------- "So far the Sonork instant messaging system has worked wonders in the Bandwidth Barn. It's one of life's little treats that you hardly believed you lived without for so long!" - Judith Middleton, Cape IT Initiative, http://www.citi.org.za

--------------------------------------------------------