CASE (SELECT COUNT(ACCOUNT) FROM memberdata) WHEN 0 THEN 'No'
ELSE
ELSE
CASE
Floor(
Floor(
( SELECT CONVERT(DECIMAL(8, 2), (SELECT COUNT(ACCOUNT) FROM memberdata WHERE Datediff("d", birthday, Getdate()) < 365.25*20) )
/
CONVERT(DECIMAL(8, 2), (SELECT COUNT(ACCOUNT) FROM memberdata))
) + 0.5
)
WHEN 0 THEN 'No' ELSE 'Yes'
END
END AS 'moreThanHalf'
END
END AS 'moreThanHalf'
沒有留言:
張貼留言