Click here to Skip to main content
15,906,463 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Query For String Searching Pin
Corporal Agarn10-Jan-13 4:40
professionalCorporal Agarn10-Jan-13 4:40 
GeneralRe: SQL Query For String Searching Pin
lhsunshine10-Jan-13 17:51
lhsunshine10-Jan-13 17:51 
AnswerRe: SQL Query For String Searching Pin
Richard MacCutchan10-Jan-13 4:58
mveRichard MacCutchan10-Jan-13 4:58 
AnswerRe: SQL Query For String Searching Pin
PIEBALDconsult10-Jan-13 7:37
mvePIEBALDconsult10-Jan-13 7:37 
GeneralRe: SQL Query For String Searching Pin
lhsunshine10-Jan-13 11:55
lhsunshine10-Jan-13 11:55 
GeneralRe: SQL Query For String Searching Pin
PIEBALDconsult10-Jan-13 12:43
mvePIEBALDconsult10-Jan-13 12:43 
GeneralRe: SQL Query For String Searching Pin
lhsunshine10-Jan-13 17:01
lhsunshine10-Jan-13 17:01 
GeneralRe: SQL Query For String Searching Pin
PIEBALDconsult10-Jan-13 17:44
mvePIEBALDconsult10-Jan-13 17:44 
If you think it will do what you need you can write a function in C# or VB and add it to SQL Server (I assume you're using SQL Server). As to how to add it to SQL Server, I'd rather write a tip than post it here.

Given that the function has the signature int Levenshtein ( string , string ) you would then be able to say:

SELECT * FROM sometable WHERE dbo.Levenshtein ( somefield , @somevalue ) < @somethreshold

The threshold should probably be based on the lengths of the strings, for instance half the length of the shorter string.

To make things more efficient, you could write a function with the signature bool IsSimilar ( string , string , int ) that will return false as soon as the Levenshtein Distance between the strings exceeds the threshold (the third parameter).

SELECT * FROM sometable WHERE dbo.IsSimilar ( somefield , @somevalue , @somethreshold ) = 1
AnswerRe: SQL Query For String Searching Pin
jschell10-Jan-13 14:10
jschell10-Jan-13 14:10 
GeneralRe: SQL Query For String Searching Pin
PIEBALDconsult11-Jan-13 16:55
mvePIEBALDconsult11-Jan-13 16:55 
JokeRe: SQL Query For String Searching Pin
Eddy Vluggen11-Jan-13 17:18
professionalEddy Vluggen11-Jan-13 17:18 
QuestionMaximum number of concurrent connections to SQL Server 2008 Pin
Danzy8310-Jan-13 1:21
Danzy8310-Jan-13 1:21 
AnswerRe: Maximum number of concurrent connections to SQL Server 2008 Pin
David Mujica10-Jan-13 2:56
David Mujica10-Jan-13 2:56 
AnswerRe: Maximum number of concurrent connections to SQL Server 2008 Pin
PIEBALDconsult10-Jan-13 3:03
mvePIEBALDconsult10-Jan-13 3:03 
GeneralRe: Maximum number of concurrent connections to SQL Server 2008 Pin
Mycroft Holmes10-Jan-13 11:47
professionalMycroft Holmes10-Jan-13 11:47 
GeneralRe: Maximum number of concurrent connections to SQL Server 2008 Pin
PIEBALDconsult10-Jan-13 13:52
mvePIEBALDconsult10-Jan-13 13:52 
AnswerRe: Maximum number of concurrent connections to SQL Server 2008 Pin
jschell10-Jan-13 14:23
jschell10-Jan-13 14:23 
GeneralRe: Maximum number of concurrent connections to SQL Server 2008 Pin
Danzy8311-Jan-13 2:59
Danzy8311-Jan-13 2:59 
GeneralRe: Maximum number of concurrent connections to SQL Server 2008 Pin
PIEBALDconsult11-Jan-13 3:17
mvePIEBALDconsult11-Jan-13 3:17 
GeneralRe: Maximum number of concurrent connections to SQL Server 2008 Pin
jschell11-Jan-13 6:18
jschell11-Jan-13 6:18 
QuestionSQL Storedprocedure trace other than profiler Pin
Member 31370789-Jan-13 20:19
Member 31370789-Jan-13 20:19 
AnswerRe: SQL Storedprocedure trace other than profiler Pin
Sandeep Mewara9-Jan-13 21:22
mveSandeep Mewara9-Jan-13 21:22 
AnswerRe: SQL Storedprocedure trace other than profiler Pin
Mycroft Holmes9-Jan-13 21:29
professionalMycroft Holmes9-Jan-13 21:29 
QuestionZombie check on Transaction - How to reproduce it? Pin
Member 31370787-Jan-13 22:32
Member 31370787-Jan-13 22:32 
QuestionCassandra or MySQL? Pin
Jassim Rahma7-Jan-13 4:56
Jassim Rahma7-Jan-13 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.