日期:2014-05-17 浏览次数:20658 次
SELECT S.NO 学号,
(SELECT TOP 1 DATE
FROM STU
WHERE ID = S.ID AND S.ID = '1210527501') AS 时间1,
(SELECT TOP 1 DATE
FROM STU
WHERE ID = S.ID AND S.ID = '1210527502') AS 时间2,
(SELECT TOP 1 DATE
FROM STU
WHERE ID = S.ID AND S.ID = '1210527503') AS 时间3
FROM STU S
WHERE S.NO LIKE '1240156742010%';
SELECT S.NO 学号,
CASE
WHEN S.ID = '1210527501' THEN
(SELECT TOP 1 DATE
FROM STU
WHERE ID = '1210527501')