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

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

WITH Posts_CTE AS
(
  SELECT p.*,
    TitleEncoded = REPLACE(REPLACE(REPLACE(p.Title, '&', '&amp;'), '<', '&lt;'), '>', '&gt;'),
    Url = 'https://##SiteDomain?stackoverflow.com##/q/' + CAST(p.Id AS NVARCHAR),
    PostRender = 
      '<div class="post-layout">' + CHAR(10) +
        '<div class="votecell post-layout--left">' + CHAR(10) +
          '<div class="vote-count">' + CHAR(10) +
            CAST (p.Score AS NVARCHAR) +
          '</div>' + CHAR(10) +
          '<div class="favorite-count">' + CHAR(10) +
            CAST (p.FavoriteCount AS NVARCHAR) +
          '</div>' + CHAR(10) +
        '</div>' + CHAR(10) +
        '<div class="postcell post-layout--right">' + CHAR(10) +
          '<div class="post-text">' + CHAR(10) +
            p.Body +
          '</div>' + CHAR(10) +
        '</div>' + CHAR(10) +
      '</div>' + CHAR(10)
  FROM Posts p
)

SELECT TOP 10 *
From Posts_CTE

Enter Parameters

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