没有什么功能是自动做的。您必须手动构建消息。
SELECT @dates=(DATEDIFF(dd, First_Half_Start, GETDATE())),
@hours=(DATEDIFF(hour, First_Half_Start, GETDATE()))-(DATEDIFF(dd, First_Half_Start, GETDATE()))*24,
@minutes=(DATEDIFF(minute, First_Half_Start, GETDATE()))-(DATEDIFF(hour, First_Half_Start, GETDATE()))*60,
@seconds=(DATEDIFF(second, First_Half_Start, GETDATE()))-(DATEDIFF(minute, First_Half_Start, GETDATE()))*60
FROM Match_Schedule;
IF ((@dates<0 or @hours<0 or @minutes<0 or @seconds<0)
SET @status=CAST(ABS(@dates) AS VARCHAR)+' Days '+CAST(ABS(@hours) AS VARCHAR)+' hours '+CAST(ABS(@minutes) AS VARCHAR)+' minutes '+CAST(ABS(@seconds) AS VARCHAR)+' seconds left'
ELSE
SET @status='In Progress'