Find identical titles in given tag (SE 2.0 version)

0

Please login or register to vote for this query.

(click on this box to dismiss)

We exclude closed questions, and also show the creation date of the posts. This does not work on the trilogy sites (SO, SU, SF) and some of SE 2.0 (mathematics, gis, webapps, stats, stackapps, gamedev, webmasters) - use the trilogy version (http://data.stackexchange.com/stackoverflow/s/1808/) there. Also, I'm not sure if I did all the replacements right.

Drupal Answers

Q&A for Drupal developers and administrators

-- We exclude closed questions, and also show the creation date of the posts.
-- This does not work on the trilogy sites (SO, SU, SF) and some of SE 2.0
-- (mathematics, gis, webapps, stats, stackapps, gamedev, webmasters) - 
-- use the trilogy version (http://data.stackexchange.com/stackoverflow/s/1808/)
-- there.
-- 
-- Also, I'm not sure if I did all the replacements right.

DECLARE @tag nvarchar(25) = ##tag:string##;

SET @tag = Replace(Replace(Replace(Replace(@tag, '-', 'ö'), '+', 'ç'), '#', 'ñ'), '.', 'û');
DECLARE @tagpattern nvarchar(29) = '%é' + @tag + 'à%';

SELECT a.Id AS [Post Link], a.CreationDate AS "First Date",
       b.Id AS [Post Link], b.CreationDate AS "Second Date"
FROM Posts AS a JOIN Posts AS b ON a.Title = b.Title
WHERE a.Id < b.Id
  and (a.Tags like @tagpattern or b.Tags like @tagpattern)
  and a.ClosedDate IS NULL
  and b.ClosedDate IS NULL;

Enter Parameters

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