规划院培训费用统计查询的sql语句
2010-01-22 15:46
288 查看
create or replace view pxfy_view as
select t1.form_id,t1.reserve as mid,t1.feiyong,t.cjpxr_name as full_name,1 as pxlx,t1.topic,t1.identity,
t1.begin_time as CREATEDATE,t1.end_time as completedate,pv.city,pv.DEPT_ID
from wf_oa_pxnb_cjry t,WF_OA_PXNB t1,person_view pv where t.form_id=t1.form_id and t.cjpxr=pv.ACCOUNT
union all
select t1.form_id,t1.reserve as mid,t1.feiyong,t.cjr_name as full_name,0 as pxlx,t1.topic,t1.identity,
t1.begin_time as CREATEDATE,t1.end_time as completedate,pv.city,pv.DEPT_ID
from wf_oa_px_pxjl t,WF_OA_PX t1,person_view pv where t.form_id=t1.form_id and t.cjr=pv.ACCOUNT
select t1.form_id,t1.reserve as mid,t1.feiyong,t.cjpxr_name as full_name,1 as pxlx,t1.topic,t1.identity,
t1.begin_time as CREATEDATE,t1.end_time as completedate,pv.city,pv.DEPT_ID
from wf_oa_pxnb_cjry t,WF_OA_PXNB t1,person_view pv where t.form_id=t1.form_id and t.cjpxr=pv.ACCOUNT
union all
select t1.form_id,t1.reserve as mid,t1.feiyong,t.cjr_name as full_name,0 as pxlx,t1.topic,t1.identity,
t1.begin_time as CREATEDATE,t1.end_time as completedate,pv.city,pv.DEPT_ID
from wf_oa_px_pxjl t,WF_OA_PX t1,person_view pv where t.form_id=t1.form_id and t.cjr=pv.ACCOUNT
相关文章推荐
- SQL 统计查询语句消耗时间
- MySQL查询某个字段为某值的次数统计SQL语句
- SQL SERVER查询优化工具:统计SQL语句执行时间
- Oracle SQL语言之查询语句_超越OCP精通Oracle视频教程培训29
- SQL中统计数据的查询语句写法
- 一条sql语句实现统计查询
- SQL 语句关联函数查询进销存多次入库剩余数量统计
- 培训费用统计查询1
- sq更新语句条件子查询中有分组统计的sql,导致错误1093
- 培训费用统计查询
- ACCESS JET SQL 分段或者交叉统计的查询语句怎么写?
- 统计一个数据库中表个数的sql查询语句
- 统计查询两列相同的sql语句
- sql语句统计查询
- 统计:后台通过查询数据表(该表存放统计的sql语句)返回规定格式的json数据
- 培训费用统计查询2
- MySQL查询某个字段为某值的次数统计SQL语句
- mysql按年度、季度、月度、周、日统计查询的sql语句
- 使用SQL语句对重复记录查询、统计重复次数、删除重复数据
- sql语句按月份统计查询