All questions and answers by user, rendered as HTML

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

SELECT 
  '<html>' + CHAR(10) + 
  '<body>' + CHAR(10) + 
  STRING_AGG(
    '<div>' + CHAR(10) +
      '<h1 class="question-header">' + CHAR(10) +
        '<a class="question-hyperlink" href="site://posts/' + CAST(a.Id AS NVARCHAR) + '">' + CHAR(10) +
          REPLACE(REPLACE(REPLACE(a.Title, '&', '&amp;'), '<', '&lt;'), '>', '&gt;') + CHAR(10) +
        '</a>' + CHAR(10) +
      '</h1>' + CHAR(10) +
      '<div>' + CHAR(10) +
        a.Body +
      '</div>' + CHAR(10) +
    '</div>' + CHAR(10),
    '<hr/>'
  ) WITHIN GROUP (ORDER BY a.CreationDate ASC) +
  '</body>' + CHAR(10) + 
  '</html>'
FROM Posts a
WHERE a.PostTypeId = 1 -- Answer
AND OwnerUserId = ##UserId:int?1149773##

Enter Parameters

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