Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

String Comparison using "Score Method"
Dear All:

I encounter one problem when I want to implement my thought. My thought
is that user want to search a record of someone but maybe user would
type wrong name or spell name wrong. I wish to compare the string which
user inputed to the database column using "Socre Method". "Score
Method" has a variable "grade" to accumulate the score. I want to
convert the string to char array, and compare the char one by one. If
the string is more accurate , the grade is more high. At last, I choose
the most higher score record to show. How to do this thought with tsql?
Could give me some tips or guide to learn? I will appreciate your
kindness, thanks.


Report this thread to moderator Post Follow-up to this message
Old Post
ShihChengYu@gmail.com
04-04-06 08:28 AM


Re: String Comparison using "Score Method"
ShihChengYu@gmail.com  wrote:
> Dear All:
>
> I encounter one problem when I want to implement my thought. My thought
> is that user want to search a record of someone but maybe user would
> type wrong name or spell name wrong. I wish to compare the string which
> user inputed to the database column using "Socre Method". "Score
> Method" has a variable "grade" to accumulate the score. I want to
> convert the string to char array, and compare the char one by one. If
> the string is more accurate , the grade is more high. At last, I choose
> the most higher score record to show. How to do this thought with tsql?
> Could give me some tips or guide to learn? I will appreciate your
> kindness, thanks.

http://www.merriampark.com/ld.htm

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--


Report this thread to moderator Post Follow-up to this message
Old Post
David Portas
04-04-06 12:35 PM


Re: String Comparison using "Score Method"
Did you try SOUNDEX or DIFFERENCE?


Report this thread to moderator Post Follow-up to this message
Old Post
Sergey
04-04-06 06:29 PM


Re: String Comparison using "Score Method"
If you're willing to compare the input string with every entry in a
table, then something like Levenshtein distance or other forms of edit
distance will work.  But it's not much use for a quick lookup.  To do
that, you're better off with a hash function, which can be pre-computed
and indexed in the reference table.  For example, discard "noise"
tokens, and for the remaining tokens compute their Soundex value (or
some similar function) and concatenate together.


Report this thread to moderator Post Follow-up to this message
Old Post
jim_geissman@countrywide.com
04-05-06 01:27 AM


Re: String Comparison using "Score Method"
Look up the material given here:

http://www.codeproject.com/string/dmetaphone6.asp


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
04-05-06 04:32 PM


Re: String Comparison using "Score Method"
Hi,

there is a built in function for that which is called SOUNDEX, perhaps
you might start with this one.

HTH, jens Suessmeyer.

---
http://www.sqlserver2005.de
---


Report this thread to moderator Post Follow-up to this message
Old Post
Jens
04-07-06 01:26 AM


Re: String Comparison using "Score Method"
Thanks for your advise, I completed it already. Thank you.


Report this thread to moderator Post Follow-up to this message
Old Post
ShihChengYu@gmail.com
04-08-06 08:25 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 07:54 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006