create table mmcforemar_zbb_20080215_1 as
select * from mmcforemar a where a.orgid in (select d.bizentityid from bizentity d where d.parentbizentityid=100026)
and to_char(a.foredate,'yyyymm')='200803'
select d.bizentityid from bizentity d where d.parentbizentityid=100026
--修改市场部
update mmcforemar a set a.submited=0 where a.orgid in (select d.bizentityid from bizentity d where d.parentbizentityid=100026)
and to_char(a.foredate,'yyyymm')='200803'
create table mmcforemgr_zbb_20080215_1 as
select * from mmcforemgr b where b.managerid in
(select userid from kenoahuser dd where dd.homebizentityid in ( select d.bizentityid from bizentity d where d.parentbizentityid=100026))
and to_char(b.foredate,'yyyymm')='200803'
--修改客户经理
update mmcforemgr b set b.submited=0 where b.managerid in
(select userid from kenoahuser dd where dd.homebizentityid in ( select d.bizentityid from bizentity d where d.parentbizentityid=100026))
and to_char(b.foredate,'yyyymm')='200803'
create table mmcforecomp_zbb_20080215_1 as
select * from mmcforecomp a1 where a1.orgid=100009 and to_char(a1.foredate,'yyyymm')='200803'
----修改区公司
update mmcforecomp a1 set a1.submited=0 where a1.orgid=100009 and to_char(a1.foredate,'yyyymm')='200803'