H
honestman
Unregistered / Unconfirmed
GUEST, unregistred user!
我用Delphi 5.x+Access 2000开发数据库。在查询的时候需要用若干个
“left outer join”。但是,在用Access 2000自带的工具调试的时候,发现怎么也通过
不了,为什么?
SELECT xm,yy,y1
from (SELECT DISTINCT gcbk.xmmc as xm FROM gdzctz, gcbk WHERE
gdzctz.xmmc=gcbk.xmmc and bkrq like "2001*" and fj="佛山" and yhfl="企业")
AS jbzl left outer join (select xmmc,sum(bkje) as yy from gcbk where
bkrq<"2001*" group by xmmc) as y on jbzl.xm=y.xmmc left outer join
(select xmmc,sum(bkje) as y1 from gcbk where bkrq like "2001-01*" group by
xmmc) as yy1 on jbzl.xm=yy1.xmmc;
调试时显示:
Syntax error (missing operator) in query expression 'jbzl.xm=y.xmmc left outer
join (select xmmc,sum(bkje) as y1 from gcbk where bkrq like "2001-01*" group
by xmmc) as yy1 on jbzl.xm=yy1.xmmc'.
“left outer join”。但是,在用Access 2000自带的工具调试的时候,发现怎么也通过
不了,为什么?
SELECT xm,yy,y1
from (SELECT DISTINCT gcbk.xmmc as xm FROM gdzctz, gcbk WHERE
gdzctz.xmmc=gcbk.xmmc and bkrq like "2001*" and fj="佛山" and yhfl="企业")
AS jbzl left outer join (select xmmc,sum(bkje) as yy from gcbk where
bkrq<"2001*" group by xmmc) as y on jbzl.xm=y.xmmc left outer join
(select xmmc,sum(bkje) as y1 from gcbk where bkrq like "2001-01*" group by
xmmc) as yy1 on jbzl.xm=yy1.xmmc;
调试时显示:
Syntax error (missing operator) in query expression 'jbzl.xm=y.xmmc left outer
join (select xmmc,sum(bkje) as y1 from gcbk where bkrq like "2001-01*" group
by xmmc) as yy1 on jbzl.xm=yy1.xmmc'.