Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

 SQL Server Forums Profile | Active Topics | Members | Search | Forum FAQ Register Now and get your question answered!
 All Forums  Site Related Forums  The Yak Corral  Twit List Reply to Topic  Printer Friendly
Author  Topic
Page: of 88

Yak Posting Veteran

54 Posts

 Posted - 09/05/2008 :  12:26:38 Of crs, I saw it. I meant "abcdef" = "abcdefxyzxyz", no referring to human names.Secondly, my exact taste is: CompareText(txt1, txt2) => LCS(txt1, txt2) / MAX(Len(txt1), Len(txt2)) * 100%,where LCS is Longest Common Subsequence of txt1 and txt2: http://en.wikipedia.org/wiki/Longest_common_subsequenceAnd of course it's slow (O(n*m)):``` CREATE FUNCTION mf_LCSLength ( @x varchar(8000), @y varchar(8000) ) returns int AS /* Computing the length of the LCS: http://en.wikipedia.org/wiki/Longest_common_subsequence The below function takes as input sequences X[1..m] and Y[1..n] computes the LCS between X[1..i] and Y[1..j] for all 1 = i = m and 1 = j = n, and stores it in C[i,j]. C[m,n] will contain the length of the LCS of X and Y. function LCSLength(X[1..m], Y[1..n]) C = array(0..m, 0..n) for i := 0..m C[i,0] = 0 for j := 0..n C[0,j] = 0 for i := 1..m for j := 1..n if X[i] = Y[j] C[i,j] := C[i-1,j-1] + 1 else: C[i,j] := max(C[i,j-1], C[i-1,j]) return C[m,n] */ BEGIN declare @i int declare @j int declare @p int declare @q int declare @n int declare @m int declare @t table (m int, a int, b int) select @n = len(@x), @m = len(@y), @i = 0 while @i <= @m begin insert into @t select @i, 0, 0 set @i = @i + 1 end set @i = 1 while @i <= @n begin set @j = 1 while @j <= @m begin if substring(@x, @i, 1) = substring(@y, @j, 1) update @t set b = (select a from @t where m = @j - 1) + 1 where m = @j else begin select @p = a from @t where m = @j select @q = b from @t where m = @j - 1 if @p < @q set @p = @q update @t set b = @p where m = @j end set @j = @j + 1 end update @t set a = b set @i = @i + 1 end RETURN(select max(b) from @t) END set nocount on declare @x varchar(8000) declare @y varchar(8000) select @x = 'yupgayyeuntubajfncjxeyupxbpxfnxbntuxlyaludskiufntukonoyapanonaxlfojup', @y = 'hfoqujhexjalicjxeyupfxpunapufangayyeualnujufnalibjxpntunapuhxsnjhannxntunapuhxsfxyqua' select @x=lower(@x), --@x=replace(@x,'a',''),@x=replace(@x,'e',''),@x=replace(@x,'i',''),@x=replace(@x,'o',''),@x=replace(@x,'u',''), @y=lower(@y)--, @y=replace(@y,'a',''),@y=replace(@y,'e',''),@y=replace(@y,'i',''),@y=replace(@y,'o',''),@y=replace(@y,'u','') select 'blindman:', dbo.CompareText(@x,@y) select 'stoad:', 100.0*dbo.mf_LCSLength(@x,@y)/case when len(@x)>len(@y) then len(@x) else len(@y) end --------- ----------- blindman: 45 ------------- ---------------------------- stoad: 38.823529411764 ------------------------------------------------------------------------- WITHOUT VOWELES: --------- --------------------------------------------------------------- blindman: 39 ------------- ---------------------------- stoad: 40.350877192982 ```Why two different blindman's results?

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

 Posted - 09/05/2008 :  13:33:13 Because two different Stoad inputs.Boycotted Beijing Olympics 2008

Yak Posting Veteran

54 Posts

 Posted - 09/05/2008 :  17:45:22 Yes I thought this:--Convert to uppercase and remove noise charactersset @TempString = UPPER(@InputString)set @TempString = replace(@TempString, 'A', '')set @TempString = replace(@TempString, 'E', '')set @TempString = replace(@TempString, 'I', '')set @TempString = replace(@TempString, 'O', '')set @TempString = replace(@TempString, 'U', '')in dbo.CompareText()

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

 Posted - 09/05/2008 :  21:23:31 Just sad. Why do people keep trying to help this guy? http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=110081You might as well try to teach SQL to your dog. At least your dog wouldn't be rude.CODO ERGO SUM

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

 Posted - 09/07/2008 :  12:16:57 quote:Originally posted by Stoad strehngthendYes I thought this:--Convert to uppercase and remove noise charactersset @TempString = UPPER(@InputString)set @TempString = replace(@TempString, 'A', '')set @TempString = replace(@TempString, 'E', '')set @TempString = replace(@TempString, 'I', '')set @TempString = replace(@TempString, 'O', '')set @TempString = replace(@TempString, 'U', '')in dbo.CompareText()That, doe\$sn^t re@m0ve no!se ch@ra)ters. I+t jus/t rem(o)ves v_owels.Boycotted Beijing Olympics 2008

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

 Posted - 09/25/2008 :  01:28:52 Astounding.Until now, the realm of DBAs has been nearly devoid of business buzzwords. But Certus, in a single thread, has greatly expanded our lexicon.Little Gems such as "Pactory", "Tractory", "Enactory", and "Exactory" start showing up around post #64, and he throws in "heterarchically" later on.Thanks to his "EAV On Steroids" database design, we can finally hold our own when talking to mid-level managers.http://www.dbforums.com/showthread.php?t=1633864&page=5Boycotted Beijing Olympics 2008

Arnold Fribble
Yak-finder General

United Kingdom
1961 Posts

 Posted - 09/25/2008 :  08:27:24 But it leaves so many questions unanswered! What about the semantics in the underlying model theory? What notions of reification are there? How does that link in with context and provenance?(Actually, it's quite possible these were all discussed: I didn't read any more than the posts on the linked page). Edited by - Arnold Fribble on 09/25/2008 08:29:51

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

 Posted - 09/25/2008 :  08:43:44 I suspect he is developing some kind of super "Entity Attribute Vocabulary" (EAV), where words themselves have no meaning except in relation to other words, thus saving us the tedious overhead of dictionaries. Now, anybody will be able to define any word to mean anything they want, without having to worry about restrictions such as grammar or spelling.Eventually, we will only need one word: "Marklar".Boycotted Beijing Olympics 2008

LaurieCox
Posting Yak Master

USA
158 Posts

 Posted - 09/25/2008 :  09:22:27

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

 Posted - 09/25/2008 :  10:51:54 quote:Originally posted by blindmanAstounding.Until now, the realm of DBAs has been nearly devoid of business buzzwords. But Certus, in a single thread, has greatly expanded our lexicon.Little Gems such as "Pactory", "Tractory", "Enactory", and "Exactory" start showing up around post #64, and he throws in "heterarchically" later on.Thanks to his "EAV On Steroids" database design, we can finally hold our own when talking to mid-level managers.http://www.dbforums.com/showthread.php?t=1633864&page=5Boycotted Beijing Olympics 2008That "design" seems perfectly engineered to generate a steady stream of consulting revenue.I’m sure we will soon get posts where someone tries to implement it in SQL Server. "Help, every query I write with this database is 4,000 lines long, takes days to run, and tells me my inventory quantity on-hand is “Light Blue".Edit:Has anyone ever mentioned to the EVA designers that SQL Server has all that stuff built-in and supported directly by the database engine: sysobjects, syscolumns, systypes, sysreferences, sysconstraints, etc. Just saying...CODO ERGO SUM Edited by - Michael Valentine Jones on 09/25/2008 11:03:43

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

 Posted - 09/25/2008 :  10:57:26 ...or help requests such as "How can I enactor my pactors?"Boycotted Beijing Olympics 2008

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

 Posted - 09/26/2008 :  05:30:49 I love this guy raky for many many similar postshttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111451E 12°55'05.63"N 56°04'39.26"

tosscrosby
Aged Yak Warrior

USA
676 Posts

 Posted - 09/26/2008 :  09:08:57 quote:Originally posted by Michael Valentine JonesJust sad. Why do people keep trying to help this guy? http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=110081You might as well try to teach SQL to your dog. At least your dog wouldn't be rude.CODO ERGO SUM That's why it's a good thing that lions eat their young....Weed out the weaklings!Terry

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

 Posted - 09/27/2008 :  05:35:53 This guy doesnt seem to look into solutions provided before posting againhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111518

uberman
Posting Yak Master

159 Posts

 Posted - 10/27/2008 :  09:13:40 http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94903 ... potential twit-hood beckoning for appyks?

RickD
Slow But Sure Yak Herding Master

United Kingdom
3608 Posts

 Posted - 10/27/2008 :  10:11:01 quote:Originally posted by ubermanhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94903 ... potential twit-hood beckoning for appyks?My head hurts now and I gave up trying to read what he typed after the first few words.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

 Posted - 11/11/2008 :  12:13:31 I think we need a new forum called "Just Write the Code for Me"http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=114090CODO ERGO SUM

DavidChel
Constraint Violating Yak Guru

USA
474 Posts

 Posted - 11/12/2008 :  17:02:51 visakh16 is a saint.

spirit1
Cybernetic Yak Master

Slovenia
11752 Posts

 Posted - 11/12/2008 :  18:26:56 probably just wants to claim Peso's title _______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! Edited by - spirit1 on 11/12/2008 18:27:07

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

 Posted - 11/19/2008 :  04:26:15 Copy and paste reaches new heights!http://forums.asp.net/t/1339487.aspxhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96424Sourcehttp://weblogs.sqlteam.com/peterl/archive/2008/10/10/Keep-track-of-all-your-jobs-schedules.aspxE 12°55'05.63"N 56°04'39.26" Edited by - SwePeso on 11/19/2008 04:29:47
Page: of 88  Topic
 Reply to Topic  Printer Friendly Jump To: Select Forum General SQL Server Forums       New to SQL Server Programming       New to SQL Server Administration       Script Library       Data Corruption Issues       Database Design and Application Architecture SQL Server 2012 Forums       Transact-SQL (2012)       SQL Server Administration (2012)       SSIS and Import/Export (2012)       Analysis Server and Reporting Services (2012)       Replication (2012)       Availability Groups and DR (2012)       Other SQL Server 2012 Topics SQL Server 2008 Forums       Transact-SQL (2008)       SQL Server Administration (2008)       SSIS and Import/Export (2008)       High Availability (2008)       Replication (2008)       Analysis Server and Reporting Services (2008)       Other SQL Server 2008 Topics SQL Server 2005 Forums       Transact-SQL (2005)       SQL Server Administration (2005)       .NET Inside SQL Server (2005)       SSIS and Import/Export (2005)       Service Broker (2005)       Replication (2005)       High Availability (2005)       Analysis Server and Reporting Services (2005)       Express Edition and Compact Edition (2005)       Other SQL Server Topics (2005) SQL Server 2000 Forums       SQL Server Development (2000)       SQL Server Administration (2000)       Import/Export (DTS) and Replication (2000)       Transact-SQL (2000)       Analysis Services (2000)       MSDE (2000) Development Tools       ASP.NET       Reporting Services Development       Other Development Tools Site Related Forums       Site Related Discussions       Article Discussion       Poll Discussion       The Yak Corral Other Forums       SQL Server 6.5 \ SQL Server 7.0       Other Topics       MS Access       ClearTrace Support Forum Old Forums       CLOSED - General SQL Server       CLOSED - SQL Server 2005/Yukon  -------------------- Home Active Topics Frequently Asked Questions Member Information Search Page
 SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC