日期:2014-05-17 浏览次数:20541 次
SELECT dbo.Today.Task AS TaskDescr, dbo.Today.No, dbo.Today.Downno,
dbo.Today_2.time4 AS time4, dbo.Today.Via AS bypass, dbo.Today.Hos AS Hos,
dbo.Today.time1 AS time1, dbo.Today.time2 AS time2,
dbo.Today.time5 AS Time5, dbo.Today.time3 AS time3,
dbo.Today.Area AS area, '出' AS io, dbo.Today.Status,
CASE WHEN dbo.Today.ber < 0 THEN '' WHEN dbo.Today.ber IN (1) THEN '南' + CONVERT(varchar,
dbo.Today.ber) WHEN dbo.Today.ber > 17 THEN '北' + CONVERT(varchar, dbo.Today.ber)
ELSE CONVERT(varchar, dbo.Today.ber) END AS Ber, dbo.Today.Gate AS Gate,
dbo.Today.Pla AS Pla, dbo.Today.type,
dbo.Reason.ReasonCN AS DisplayReason, CASE WHEN ltrim(rtrim(dbo.Today.Memo)) = '' AND
ltrim(rtrim(dbo.Today.StatMemo)) <> '' THEN dbo.TodayD.StatMemo WHEN ltrim(rtrim(dbo.Today.Memo))
<> '' AND ltrim(rtrim(dbo.Today.StatMemo))
= '' THEN dbo.Today.Memo WHEN ltrim(rtrim(dbo.Todays.Memo)) <> '' AND