日期:2014-05-18  浏览次数:20543 次

为什么编辑通过,运行确是错误呢?
select   *   from  
(
select   *   from   agencyinfo_tbl
union   all  
select   *   from   agencyinfo_tbl_wk
)tmp
where
syain_no= 'bc05 '
group   by
                    dairisyuryo_date,dairikaisi_date,dairi_kubun,kenmu_no
having   count(*)=1

------解决方案--------------------
select dairisyuryo_date,dairikaisi_date,dairi_kubun,kenmu_no
from
(
select * from agencyinfo_tbl
union all
select * from agencyinfo_tbl_wk
)tmp
where
syain_no= 'bc05 '
group by
dairisyuryo_date,dairikaisi_date,dairi_kubun,kenmu_no
having count(*)=1

试试这样
------解决方案--------------------
报什么错误呢?