Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation
With link_start as ( SELECT [id], CHARINDEX('http://blog.stackoverflow.com', body) pos, body FROM posts WHERE BODY like '%http://blog.stackoverflow.com%') , link_end as ( SELECT id , pos, CHARINDEX('">', body, pos) CloseTag, CHARINDEX('" rel="nofollow', body, pos) NoFollow, body FROM link_start) SELECT id, pos, closetag, nofollow FRom link_end