SELECT P.Id AS [Post Link], (LEN(P.Body) - LEN(REPLACE(P....

0

Please login or register to vote for this query.

(click on this box to dismiss)

Psychology and Neuroscience

Q&A for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

SELECT
  P.Id AS [Post Link],
  (LEN(P.Body) - LEN(REPLACE(P.Body, 'ERROR', '____'))) AS MatchCount,
  P.Score
FROM (
  SELECT P.Id, P.Body COLLATE Latin1_General_BIN AS Body, P.PostTypeId, P.Score
  FROM Posts P WHERE P.Body COLLATE Latin1_General_BIN LIKE '%ERROR%ERROR%'
) P
WHERE
  P.PostTypeId = 2 AND LEN(P.Body COLLATE Latin1_General_BIN) > 200
  --(LEN(P.Body) - LEN(REPLACE(P.Body, 'ERROR', '____'))) >= 2
  AND P.Score <= 2
ORDER BY [MatchCount] DESC
;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results