日期:2014-05-16  浏览次数:20996 次

请问在 access2003中 4个表以上包括4个表的连接语句应该怎么些啊!谢谢!
请问在   access中   4个表以上包括4个表的连接语句应该怎么些啊!谢谢!
希望能够举个四个表的例子   ,还有5个表的例子!谢谢了!

------解决方案--------------------
sELECT JanCd, MAX(SH.ShName) AS ShName, SUM(ST.Hachusu) AS Hachusu, SUM(ST.Hikiatesu) AS Hikiatesu,
SUM(ST.Syukasu) AS Syukasu, SUM(ST.Kepinsu) AS Kepinsu
FROM (
SELECT
ST.JanCd,
SH.ShName,
ST.Hachusu,
ST.Hikiatesu,
ST.Syukasu,
ST.Kepinsu
FROM ((CT_Denpyo DT
INNER JOIN CT_Syohin ST ON DT.RecvDate= ST.RecvDate AND DT.RecvCnt = ST.RecvCnt AND DT.StCd = ST.StCd AND DT.TkCd = ST.TkCd
AND DT.TenpoCd = ST.TenpoCd
AND DT.DenNo = ST.DenNo)
LEFT JOIN CT_Shconv SH
ON ST.StCd = SH.StCd
AND ST.TkCd = SH.TkCd
AND ST.JanCd = SH.JanCd)
LEFT JOIN CT_Zaiko ZT
ON SH.SHCd = ZT.SHCd
WHERE DT.StCd = 3100
AND DT.TkCd = 44152
AND DT.Nohinbi = '20070924 '
AND DT.Syukabi = '20070924 ')
AS wk1 GROUP BY JanCd
ORDER BY JanCd