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库中列举五字代码点所属航路及终端区图,左连接的累加的更多相关文章

  1. CAD库中列举所有航路点

    select distinct f1.airway_point_name,f1.latitude,f1.longitude,upper(f1.airway_point_type_name)type,f ...

  2. 在Team Foundation Server (TFS)的代码库或配置库中查找文件或代码

    [update 2017.2.11] 最新版本的TFS 2017已经增加了代码搜索功能,可以参考这个链接 https://blogs.msdn.microsoft.com/visualstudioal ...

  3. Oracle--数据库中的五种约束

    数据库中的五种约束 数据库中的五种约束及其添加方法 五大约束 1.--主键约束(Primay Key Coustraint) 唯一性,非空性  2.--唯一约束 (Unique Counstraint ...

  4. 查询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 ...

  5. CAD库中统计PBN运行航路条数和总距离

    select 'PBN运行航路' 类型, fb.b 总条数, fa.a 总距离 from                (                select sum(s)  a  from ...

  6. x64共享库中的位置无关代码(PIC)

    原作者:Eli Bendersky http://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-li ...

  7. C 标准库 中 操作 字符串 的 代码

    1)字符串操作 strcpy(p, p1) 复制字符串 strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定长度 ...

  8. 如何统计TFS代码库中的团队项目所占用的磁盘空间

    在一个开发团队较多的研发中心,当开发人员的代码数据积累到一定程度,TFS系统的磁盘空间的使用率会逐渐成为系统管理员关注的问题.你可能会关注代码库中每个团队项目,甚至每个目录占用的的磁盘空间.不幸的,即 ...

  9. stm32存储器映像和标准库中定义外设地址的方法

    结合存储器映像理解stm32标准库中定义外设地址的方法. stm32f103zet6是32位的.它所能访问的地址空间范围为2^32=4GB,把4GB分为8个block,分别为block0-block- ...

随机推荐

  1. 关于Json如何转换成对象及获值问题!

    var result = eval('('+result+')'); result为Json 转换成var result对象,可以 if(result.success){ window.locatio ...

  2. linux下 stat statfs 获取 文件 磁盘 信息

    stat函数讲解 表头文件:    #include <sys/stat.h>              #include <unistd.h> 定义函数:    int st ...

  3. java连接SQL数据库(JDBC)相关设置

    2016-06-14 一.SQL server中的相关设置(以sql server 2012 版本为例) 建立一个SQL server 身份认证的服务器登录名 首先启动SQL客户端,以windows身 ...

  4. neutron 虚拟机网络问题调试

    1. Security Group全部打开,这是最基本的,但是很多人容易忘记 2. 通过界面查看虚拟机的log,也可以在compute节点上查看console.log文件,看看里面是否有DHCP获取I ...

  5. 自己动手实现一个简化版的requireJs

    一直想实现一个简单版本的requireJs,最直接的办法去看requireJs源码搞明白原理,但是能力有限requireJs的源码比想象的要复杂许多,看了几遍也不是很明白,最后通过搜索找到了一些有价值 ...

  6. [Kafka] - Kafka内核理解:分布式机制

    一个Topic中的所有数据分布式的存储在kafka集群的所有机器(broker)上,以分区(partition)的的形式进行数据存储:每个分区允许存在备份数据/备份分区(存储在同一kafka集群的其它 ...

  7. python中的变量与对象

    一. 什么是变量 变量就是以前学习的数学中常见的等式x = 3(x是变量,3是变量值),在编程中,变量不仅可以是数学,还可以是任意数据类型 二. 变量的命名规则 变量名必须是英文大小写.数字和_的组合 ...

  8. hdu 1536/ hdu 1944 S-Nim(sg函数)

    S-Nim Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submi ...

  9. uva10648 概率dp

    https://vjudge.net/problem/UVA-10648 将n个不同小球放入m个不同盒子,放入每个盒子的概率相同,问放完之后仍有空盒子的概率: 还是太傻- -,可以倒着计算出放完之后没 ...

  10. Redis-简单动态字符串

    这是读redis设计与实现的一系列读书笔记 1.SDS定义 C语言字符串:用一个 \0 结尾的 char 数组来表示 SDS:redis自己定义的简单动态字符串(simple dyanmic stri ...