所以我有这个查询并想在其中实现一些 HTML,所以我可以在我的网站上打印而不使用循环。但我的问题是我的案件的字符串部分没有附加到testresults.TestCaseId?我怎样才能做到这一点?
SELECT
CASE WHEN testresults.StatusId = 1 THEN '<li class="list-group-item list-group-item-success">'+testresults.TestCaseId+'</li>' ELSE '' END
FROM
testresults
ORDER BY testresults.TestRunsId DESC;
此查询仅返回 testresults.TestCaseId 的值,而不是 'this'+...+'this' 部分。