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
 General SQL Server Forums
 New to SQL Server Programming
 Regular expression and percentage match

Author  Topic 

germaine84
Starting Member

1 Post

Posted - 2012-03-06 : 14:51:11
I have a form with many fields that will be entered into a database table from an aspx page. Once an entry is made, I want to create a script that takes what was entered in the comment field and search the table for matches. If a record matches 50% or more of the text, I want to calculate how much of the texts are similar and save that to a column in the database.

For example: I have tblComment. It has 10 attributes and one column is named comment. Its a varchar field. After a new entry has been made into tblComment, I want to take the text in the comment field and search the table for similar text. If a match of 50% or more is made, I want to update the comment's percent match field with the percentage.

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-06 : 15:10:06
You're gonna need to give us more than that to go on..read the hint link in my sig



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-07 : 19:19:22
sounds like what you're after is something like below

https://sites.google.com/site/sqlblindman/fuzzysearchalgorithm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -