日期:2014-05-18 浏览次数:20515 次
SELECT mb.MBID, m.MName, t.TName, c.CName, mb.SerialNum, mb.State, mb.DeliveryNum, CONVERT(varchar(100), mb.SendDate, 23) AS SendDate, CONVERT(varchar(100), mb.BackDate, 23) AS BackDate, mb.Remark FROM dbo.MachineBroken AS mb INNER JOIN dbo.Machine AS m ON mb.MBID = m.MID INNER JOIN dbo.Type AS t ON m.TID = t.TID INNER JOIN dbo.Class AS c ON t.CID = c.CID WHERE (mb.IsBack = 0)
SELECT mb.MBID, m.MName, t.TName, c.CName, mb.SerialNum, mb.State, mb.DeliveryNum, CONVERT(varchar(100), mb.SendDate, 23) AS SendDate, CONVERT(varchar(100), mb.BackDate, 23) AS BackDate, mb.Remark FROM dbo.MachineBroken AS mb INNER JOIN dbo.Machine AS m ON mb.MBID = m.MID INNER JOIN dbo.Type AS t ON mb.TID = t.TID INNER JOIN dbo.Class AS c ON mb.CID = c.CID WHERE (mb.IsBack = 0) try 感觉你的关联有问题,你还是一个表一个表的理清了吧