Skip to content

Instantly share code, notes, and snippets.

@zafergurel
Last active August 29, 2015 14:18
Show Gist options
  • Save zafergurel/a3f7edb8a44e3bef1cd6 to your computer and use it in GitHub Desktop.
Save zafergurel/a3f7edb8a44e3bef1cd6 to your computer and use it in GitHub Desktop.
Bir Kelimenin Bir Karakter Dizgisi İçindeki Tekrarlanma Sıklığını Bulma (SQL)
/*
Bir Kelimenin Bir Karakter Dizgisi İçindeki Tekrarlanma Sıklığını Bulma
*/
DECLARE @wordToFind varchar(3) = 'Hello'
DECLARE @text varchar(300) = 'Hello World! Hello World! Hello World!'
SELECT (LEN(@text) - LEN(REPLACE(@text, @wordToFind, ''))) / LEN(@wordToFind) AS Tekrar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment