select f1.pro_id,f1.pro_type, f1.code_fix_point, f1.code_type_fix_point, f1.code_fir,f2.code_icao,
nvl
(
    (select f3.significant_point_id from airway_point f3
     where f3.code_id=f1.code_fix_point
     and f3.code_icao=f2.code_icao
     and f3.origin_type=f1.code_type_fix_point
     and f3.isvalid=1
    ),
    (select f4.significant_point_id  from airway_point f4
       where f4.code_id=f1.code_fix_point
       and f4.code_fir_jep=f1.code_fir
       and f4.origin_type=f1.code_type_fix_point
       and f4.isvalid=1
       and not exists --如果没有此notexists段,会提示单条查询返回多个结果。原以为前面的nvl会排除掉nvl中二者重复的记录,但实际情况说明sql执行顺序可能不是按nvl参数顺序执行,可能是倒序执行
      ( 
       select f5.significant_point_id from airway_point f5
       where f5.code_id=f1.code_fix_point
       and f5.code_icao=f2.code_icao
       and f5.origin_type=f1.code_type_fix_point
       and f5.isvalid=1
      )
    )    
)pnt
from procedure_leg f1, procedure f2
where f1.code_fix_point is not null
and f1.pro_id=f2.PRO_ID and f1.pro_type=f2.PRO_TYPE

查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表的更多相关文章

  1. 2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加

    select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc. ...

  2. oracle 查询当前库中所有表以及某表字段信息

    select utc.COLUMN_ID,utc.TABLE_NAME,utc.COLUMN_NAME,utc.DATA_TYPE||utc.DATA_LENGTH,utc.DATA_DEFAULT, ...

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

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

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

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

  5. oracle中查询某个库中所有的表以及所占的表空间大小

    1. 查某一用户下的表select SEGMENT_NAME,TABLESPACE_NAME,sum(BYTES/1024/1024)||'M' from USER_extents where SEG ...

  6. 批量查询hive库中所有表的count

    一.准备文件 mkdir /query_hive_table_count touch query_db_name_table touch query_table_result.txt 二.编辑文件 2 ...

  7. MySQL中查询所有数据库占用磁盘空间大小和单个库中所有表的大小的sql语句

    查询所有数据库占用磁盘空间大小的SQL语句: ,),' MB') as data_size, concat(,),'MB') as index_size from information_schema ...

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

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

  9. sql 查询目标数据库中所有的表以其关键信息

    1.查询目标库中的所有表 SELECT obj.name tablename, ---表名 schem.name schemname, ---表所属的方案 idx.rows, ---一共有几行数组 C ...

随机推荐

  1. Flask 上下文管理-- (session,request,current_app的传递)--类似本地线程实现,以及多app应用

    Flask session,request,current_app的传递 请求上下文的作用 -- 封装请求相关得数据(request,session) 请求上下文 request session re ...

  2. 函数及参数http://www.cnblogs.com/Eva-J/p/7125925.html

    文件的修改操作.删除操作,with语句 函数: 函数的定义:def 函数名(形参1,形参2....): 函数的调用:函数名(实参1,实参2) 函数的返回值: 定义阶段:return 三种情况:没有返回 ...

  3. [转]MFC 调用 printf 输出

    摘自:http://blog.csdn.net/miyunhong/article/details/6704121 #include <io.h> #include <fcntl.h ...

  4. Centos6.4_X64编译安装php-5.4.17、nginx-1.4.2、mysql-5.6.13

    安装参考: CentOS 6.3编译安装Nginx1.2.2+MySQL5.5.25a+PHP5.4.5 http://www.dedecms.com/knowledge/servers/linux- ...

  5. return super(ParamValueInline,self).formfield_for_foreignkey(db_field,request,**kwargs)自己返回自己的父类

    作者:刘强胜链接:https://www.zhihu.com/question/30361435/answer/83940591来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明 ...

  6. 十一、python沉淀之路--map函数、filter函数、reduce函数、匿名函数、内置函数

    一.map函数 1.自定义函数,实现类似于map函数的功能 num_l = [1,3,4,5,6,9] def power(n): return n ** 2 def map_test(func,ar ...

  7. Java之父职场路

    Java之父——詹姆斯·高斯林出生于加拿大,是一位计算机编程天才.在卡内基·梅隆大学攻读计算机博士学位时,他编写了多处理器版本的Unix操作系统,是JAVA编程语言的创始人.1991年,在Sun公司工 ...

  8. 【转】Python自动化测试 (一) Eclipse+Pydev 搭建开发环境

    原文网址:http://www.cnblogs.com/TankXiao/archive/2013/05/29/3033640.html C#之所以容易让人感兴趣,是因为安装完Visual Studi ...

  9. 在idea下两个项目之间的maven父子级项目依赖

    配置:idea 在一个项目中的父子级依赖网上轮子太多,我就不重复造了,留个链接 http://www.cnblogs.com/tibit/p/6185704.html 说说一些我自己注意的问题,在pr ...

  10. php webservice服务端和客户端的实现

    1.创建类文件service.class.php,service类,添加若干方法. 2.用浏览器访问create_wsdl.php文件,生成service.wsdl文件. 3.修改wsdl文件,loc ...