select c.id as [Comment Link] , isnull(q.id, p.id) as [Po...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском

Вопросы и ответы для программистов

select 
      c.id as [Comment Link]    
    , isnull(q.id, p.id) as [Post Link]    
    , Isnull(q.tags, p.tags) as tags
    
from Comments c
inner join posts as p on (p.Id = c.PostId)
left  join posts as q on (q.id = p.parentId)
where 
 UserId = ##uid##
 and text like '%##search##%'

Enter Parameters

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