select GetNoticeNo,OtherNo,AppntNo,SumDuePayMoney
from ljsPay,LPEdorMain,LABranchGroup
where othernotype = '3' and LPEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup
union all
select GetNoticeNo,OtherNo,AppntNo,SumDuePayMoney
from ljsPay,LPGrpEdorMain,LABranchGroup
where othernotype = '3' and LPGrpEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup;
from ljsPay,LPEdorMain,LABranchGroup
where othernotype = '3' and LPEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup
union all
select GetNoticeNo,OtherNo,AppntNo,SumDuePayMoney
from ljsPay,LPGrpEdorMain,LABranchGroup
where othernotype = '3' and LPGrpEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup;
from ljsPay,LPEdorMain,LABranchGroup
where othernotype = '3' and LPEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup
union
select GetNoticeNo,OtherNo,AppntNo,SumDuePayMoney
from ljsPay,LPGrpEdorMain,LABranchGroup
where othernotype = '3' and LPGrpEdorMain.EdorNo = ljsPay.OtherNo
and ljsPay.AgentGroup = LABranchGroup.AgentGroup;
但是我不明白是不是你就是这么简单的要把两个表的结果合并!
注意要使用union all,否则union有相同记录只显示一条