Tag wikis with http links

0

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

--DECLARE @TagLinkTable TABLE (TagName nvarchar(35), Link nvarchar(max));

--DECLARE @index int;
--SET @index = 0;

--WHILE (SELECT PATINDEX('%http:%', expression) FROM Tags) > 0
--BEGIN
    --
--END

--SELECT t.tagname AS [TagName]
--FROM Tags t
--LEFT JOIN Posts w ON t.WikiPostId = w.Id
--WHERE w.Body LIKE '%http:%'

DECLARE @tag_link_table TABLE (TagName nvarchar(35), Link nvarchar(max));

DECLARE @tag_name nvarchar(35);

DECLARE tag_cursor CURSOR FOR
SELECT TagName FROM Tags
WHERE TagName LIKE 'B%'
ORDER BY TagName;

OPEN tag_cursor;

-- Perform the first fetch.
FETCH NEXT FROM tag_cursor
INTO @tag_name;

-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
WHILE @@FETCH_STATUS = 0
BEGIN
   -- This is executed as long as the previous fetch succeeds.
   
   INSERT INTO @tag_link_table VALUES(@tag_name, 'temp');
   
   FETCH NEXT FROM tag_cursor
INTO @tag_name;
END

CLOSE tag_cursor;
DEALLOCATE tag_cursor;

SELECT * FROM @tag_link_table;

Enter Parameters

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