|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- select a.*,b.姓名,b.性别,b.身份证号 from [标准$]A,
- (select *,2010 as 年,[2010岗位状态] as 岗位状态 from [人员数据$] union all
- select *,2011,[2011岗位状态] from [人员数据$] union all
- select *,2012,[2012岗位状态] from [人员数据$] union all
- select *,2013,[2013岗位状态] from [人员数据$] union all
- select *,2014,[2014岗位状态] from [人员数据$] union all
- select *,2015,[2015岗位状态] from [人员数据$] union all
- select *,2016,[2016岗位状态] from [人员数据$] union all
- select *,2017,[2017岗位状态] from [人员数据$] union all
- select *,2018,[2018岗位状态] from [人员数据$] union all
- select *,2019,[2019岗位状态] from [人员数据$] union all
- select *,2020,[2020岗位状态] from [人员数据$] union all
- select *,2021,[2021岗位状态] from [人员数据$] union all
- select *,2022,[2022岗位状态] from [人员数据$] union all
- select *,2023,[2023岗位状态] from [人员数据$] union all
- select *,2024,[2024岗位状态] from [人员数据$] union all
- select *,2025,[2025岗位状态] from [人员数据$] union all
- select *,2026,[2026岗位状态] from [人员数据$] union all
- select *,2027,[2027岗位状态] from [人员数据$] union all
- select *,2028,[2028岗位状态] from [人员数据$] union all
- select *,2029,[2029岗位状态] from [人员数据$] union all
- select *,2030,[2030岗位状态] from [人员数据$] union all
- select *,2031,[2031岗位状态] from [人员数据$] union all
- select *,2032,[2032岗位状态] from [人员数据$] union all
- select *,2033,[2033岗位状态] from [人员数据$] union all
- select *,2034,[2034岗位状态] from [人员数据$] union all
- select *,2035,[2035岗位状态] from [人员数据$] union all
- select *,2036,[2036岗位状态] from [人员数据$] union all
- select *,2037,[2037岗位状态] from [人员数据$] union all
- select *,2038,[2038岗位状态] from [人员数据$] union all
- select *,2039,[2039岗位状态] from [人员数据$] union all
- select *,2040,[2040岗位状态] from [人员数据$] union all
- select *,2041,[2041岗位状态] from [人员数据$] union all
- select *,2042,[2042岗位状态] from [人员数据$] union all
- select *,2043,[2043岗位状态] from [人员数据$] union all
- select *,2044,[2044岗位状态] from [人员数据$] union all
- select *,2045,[2045岗位状态] from [人员数据$])B
- where a.年=b.年 and a.岗位状态=b.岗位状态 and a.[征地单位]=b.[征地单位]
复制代码 |
|