Horrible Misspellings

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sometimes people make careless spelling mistakes and you can help find some of the common ones with this handy little query.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Horrible Misspellings
-- Sometimes people make careless spelling mistakes and you can help find some of the common ones with this handy little query.

-- Create a temporary table that we will use to store the bad spellings
-- as well as the word that it should be corrected to.
DECLARE @SpellingMistakes TABLE (wrong_word VARCHAR(255), right_word VARCHAR(255))

-- Now fill in the mistakes
INSERT INTO @SpellingMistakes (wrong_word, right_word)
VALUES ('ubunut', 'ubuntu')

-- Select all of the posts that contain the misspelled word
SELECT Id as [Post Link]
FROM Posts
WHERE
    Title LIKE '%ubunut%'

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results