Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

How does SQL pronounce SQL? Expand / Collapse
Author
Message
Posted Friday, June 28, 2013 6:28 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, June 19, 2014 12:20 PM
Points: 1,792, Visits: 895
Christian Buettner-167247 (6/28/2013)
Love the question :) Didn't know I was working with a sick whale:

SELECT DIFFERENCE('Sql','sickwhale')

omg. This made my day! Thank you. When I get home tonight, I'm letting my kids know that I became a marine biologist. I'll let them decide whether that's a promotion or lateral move...
Post #1468526
Posted Friday, June 28, 2013 6:37 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, July 18, 2014 6:18 AM
Points: 846, Visits: 849
It doesn't strike me as a particularly useful function, especially given these examples:

SELECT SOUNDEX('cent')  --C530
SELECT SOUNDEX('scent') --S253
SELECT DIFFERENCE('cent','scent') --2, a very weak match

SELECT SOUNDEX('through') --T620
SELECT SOUNDEX('threw') --T600
SELECT DIFFERENCE('through','threw') --3, a fair match

--an attempt at regional diplomacy?
SELECT SOUNDEX('route') --R300
SELECT SOUNDEX('root') --R300
SELECT SOUNDEX('rout') --R300
SELECT DIFFERENCE('root','rout') --4, a perfect match
SELECT DIFFERENCE('root','route') --4, a perfect match
SELECT DIFFERENCE('rout','route') --4, a perfect match

--let's see if the US and Canada can put this to rest once and for all:
SELECT SOUNDEX('about') --A130
SELECT SOUNDEX('aboot') --A130
SELECT SOUNDEX('abowt') --A130
SELECT SOUNDEX('abeet') --A130
--all of these will DIFFERENCE with a result of 4, of course

So that seems pretty useless.

ron


-----
a haiku...

NULL is not zero
NULL is not an empty string
NULL is the unknown
Post #1468528
Posted Friday, June 28, 2013 7:46 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:19 PM
Points: 5,974, Visits: 12,874
nice question

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

Post #1468551
Posted Friday, June 28, 2013 8:16 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, August 16, 2013 11:37 AM
Points: 97, Visits: 309
Got mixed up in my order on the answer. Love the question. Seems like something I would never get to use but I could see a time and place in the future (moving into education database) that I might be able to get a couple of uses out of this.
Post #1468570
Posted Friday, June 28, 2013 8:23 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 7:02 PM
Points: 3,313, Visits: 7,151
ronmoses (6/28/2013)
It doesn't strike me as a particularly useful function, especially given these examples:

...

So that seems pretty useless.

ron


+1



Luis C.
I am a great believer in luck, and I find the harder I work the more I have of it. Stephen Leacock

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1468576
Posted Friday, June 28, 2013 9:03 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, July 17, 2014 1:33 AM
Points: 422, Visits: 738
While I wouldn't trust the results without checking them by eye (or expect all cases to be found) DIFFERENCE can be used as a quick and dirty way of identifying a short list of possible duplicate records.

SELECT P1.*, P2.*
FROM People AS P1
INNER JOIN People AS P2
ON P1.Date_of_Birth = P2.Date_of_Birth
AND P1.Last_Name = P2.Last_Name
WHERE P1.Person_ID <> P2.Person_ID
AND DIFFERENCE(P1.First_Name,P2.First_Name) = 4

Fuzzy grouping through SSIS is a lot more sophisticated but the above query (or variants swapping first and last name) will give a quick idea of what you're facing very quickly.
Post #1468583
Posted Friday, June 28, 2013 9:05 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, July 18, 2014 6:18 AM
Points: 846, Visits: 849
BarneyL (6/28/2013)
While I wouldn't trust the results without checking them by eye (or expect all cases to be found) DIFFERENCE can be used as a quick and dirty way of identifying a short list of possible duplicate records.


I actually had to script something with a similar objective quite recently, and it didn't even occur to me to use this approach. I think I'll revisit that, thanks!

ron


-----
a haiku...

NULL is not zero
NULL is not an empty string
NULL is the unknown
Post #1468584
Posted Friday, June 28, 2013 10:03 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 10:07 AM
Points: 1,266, Visits: 2,730
Thanks Ron, awesome question.

----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------

Yeah, well...The Dude abides.
Post #1468611
Posted Friday, June 28, 2013 12:47 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, July 7, 2014 9:38 AM
Points: 1,780, Visits: 582
nice question..
Thanks..
Post #1468681
Posted Friday, June 28, 2013 12:57 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 2,326, Visits: 2,654
Thanks - really cool question.

- webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #1468684
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse