首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

为什么编辑通过,运行确是异常呢

2012-01-19 
为什么编辑通过,运行确是错误呢?select*from(select*fromagencyinfo_tblunionallselect*fromagencyinfo_tb

为什么编辑通过,运行确是错误呢?
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

试试这样
[解决办法]
报什么错误呢?

热点排行