2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加
select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc.aw 航路 from
(
select distinct wz pt from
(
select wz,tupr,0 from
(select f2.code_fix_point wz,min(f1.tu) tupr from
(
select sid_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '离场' tp from sid
union
select star_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '进场' tp from star
union
select iap_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '进近' tp from iap
) f1, procedure_leg f2
where
(
(f1.id =f2.iap_id and f1.tp='进近') or
(f1.id=f2.sid_id and f1.tp='离场') or
(f1.id=f2.star_id and f1.tp='进场')
)
and f2.code_type_fix_point= 'DESIGNATED_POINT' and length(REGEXP_REPLACE(f2.code_fix_point, '[0-9]',''))=5
group by f2.code_fix_point order by wz
)
union
select wz,aw,1 from
(
select substr(airway_point_name,instr(airway_point_name,'/')+1) wz,max(airway_identifier ) aw from AIRWAY_ORDERED_POINT
where chart_type_id =3 and
airway_point_type =11 and
instr(airway_identifier,'XX')=0 and
length(REGEXP_REPLACE(substr(airway_point_name,instr(airway_point_name,'/')+1), '[0-9]',''))=5
group by substr(airway_point_name,instr(airway_point_name,'/')+1)
)
)
)
left join
(
select wz,tupr,0 from
(
select f2.code_fix_point wz,min(f1.tu) tupr from
(
select sid_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '离场' tp from sid
union
select star_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '进场' tp from star
union
select iap_id id, substr(upper(decode(length(REGEXP_REPLACE(txt_rmk, '[^-]','')),1,txt_rmk,code_icao||'-'||txt_rmk)),1,7) || ' ' || upper(txt_desig) tu, '进近' tp from iap
) f1, procedure_leg f2
where
(
(f1.id =f2.iap_id and f1.tp='进近') or
(f1.id=f2.sid_id and f1.tp='离场') or
(f1.id=f2.star_id and f1.tp='进场')
)
and f2.code_type_fix_point= 'DESIGNATED_POINT' and length(REGEXP_REPLACE(f2.code_fix_point, '[0-9]',''))=5
group by f2.code_fix_point order by wz
)
) fb
on pt=fb.wz
left join
(
select wz,aw,1 from
(
select substr(airway_point_name,instr(airway_point_name,'/')+1) wz,max(airway_identifier ) aw from AIRWAY_ORDERED_POINT
where chart_type_id =3 and
airway_point_type =11 and
instr(airway_identifier,'XX')=0 and
length(REGEXP_REPLACE(substr(airway_point_name,instr(airway_point_name,'/')+1), '[0-9]',''))=5
group by substr(airway_point_name,instr(airway_point_name,'/')+1)
)
)fc
on pt=fc.wz
order by decode(fb.tupr,null,2,decode(fc.aw,null,3,1))
2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加的更多相关文章
- CAD库中列举所有航路点
select distinct f1.airway_point_name,f1.latitude,f1.longitude,upper(f1.airway_point_type_name)type,f ...
- 在Team Foundation Server (TFS)的代码库或配置库中查找文件或代码
[update 2017.2.11] 最新版本的TFS 2017已经增加了代码搜索功能,可以参考这个链接 https://blogs.msdn.microsoft.com/visualstudioal ...
- Oracle--数据库中的五种约束
数据库中的五种约束 数据库中的五种约束及其添加方法 五大约束 1.--主键约束(Primay Key Coustraint) 唯一性,非空性 2.--唯一约束 (Unique Counstraint ...
- 查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表
select f1.pro_id,f1.pro_type, f1.code_fix_point, f1.code_type_fix_point, f1.code_fir,f2.code_icao,nv ...
- CAD库中统计PBN运行航路条数和总距离
select 'PBN运行航路' 类型, fb.b 总条数, fa.a 总距离 from ( select sum(s) a from ...
- x64共享库中的位置无关代码(PIC)
原作者:Eli Bendersky http://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-li ...
- C 标准库 中 操作 字符串 的 代码
1)字符串操作 strcpy(p, p1) 复制字符串 strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定长度 ...
- 如何统计TFS代码库中的团队项目所占用的磁盘空间
在一个开发团队较多的研发中心,当开发人员的代码数据积累到一定程度,TFS系统的磁盘空间的使用率会逐渐成为系统管理员关注的问题.你可能会关注代码库中每个团队项目,甚至每个目录占用的的磁盘空间.不幸的,即 ...
- stm32存储器映像和标准库中定义外设地址的方法
结合存储器映像理解stm32标准库中定义外设地址的方法. stm32f103zet6是32位的.它所能访问的地址空间范围为2^32=4GB,把4GB分为8个block,分别为block0-block- ...
随机推荐
- EasyUI学习
1.基础知识: 1)Parser解析器: div指定了class后能有效果是因为开始时文档时加载DOM但是一些由js动态生成的指定了class的div没有被解析此时就需要手动解析了 js动态生成的指定 ...
- HIVE HSQL 基本操作命令
创建表: hive>create table tablename(id int,name string,password string); 创建一个名字为tablename的表,表的属性有int ...
- Java中的算术运算符
算术运算符主要用于进行基本的算术运算,如加法.减法.乘法.除法等. Java 中常用的算术运算符: 其中,++ 和 -- 既可以出现在操作数的左边,也可以出现在右边,但结果是不同滴 例1: 运行结果: ...
- js命令模式
命令模式(Command),将一个请求封装为一个对象,从而使你可用不同的请求对客户进行参数化:对请求排队或记录请求日志,以及支持可撤销的操作. 从命令模式的结构图可以看出,它涉及到五个角色,它们分别是 ...
- tomcat配置 启动
<Context docBase="E:\apache-tomcat-7.0.50\wtpwebapps\mycms" path="" reloadab ...
- InnoDB并发事务
目录 1.行锁:索引加锁 2.意向锁 3.间隙锁 4.MVCC机制 行锁 InnoDB通过多版本并发控制MVCC来支持事务 InnoDB的设计是为了在处理大数据量的时候得到最好的性能.InnoDB存 ...
- github-如何设置SSH Key
设置SSH Key 在注册好github账号后,打开你的电脑桌面上的一个文件夹,这就建立了一个本地工作库,在里面点击鼠标右键,找到你的git bash here-点击开,如图所示:进行下面操作: 输入 ...
- 删除rime输入法
mac: 首先将输入法从偏好设置-键盘-输入源中去除,添加系统的输入法. 然后执行命令: $ killall Squirrel $ sudo rm -Rf "/Library/Input M ...
- Android Studio开发技巧
为了android更有效率的开发,总结学习android集成开发环境(android studio1.3为例) android studio 1-打印log及配置ec快捷键 2-代码提示及移动快捷键 ...
- 使用jsonp跨域调用百度js实现搜索框智能提示(转)
http://www.cnblogs.com/oppoic/p/baidu_auto_complete.html 项目中常常用到搜索,特别是导航类的网站.自己做关键字搜索不太现实,直接调用百度的是最好 ...