博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表
阅读量:6974 次
发布时间:2019-06-27

本文共 934 字,大约阅读时间需要 3 分钟。

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

转载于:https://www.cnblogs.com/mol1995/p/7798446.html

你可能感兴趣的文章
LVM动态扩容、缩减
查看>>
winform 窗体关闭事件
查看>>
socket编程
查看>>
MySQL 表空间管理
查看>>
我的友情链接
查看>>
Spring Boot 应用教程
查看>>
嵌入式Linux裸机开发(五)——SDRAM初始化
查看>>
Mysql采坑只utf8
查看>>
Pdf Convert Image 的解决方案
查看>>
做一个项目时遇到中文乱码,于是在入口文件加了个header("Content-type:text/html;charset=utf-8");结果一刷新网页就自动下载本网页文件;...
查看>>
【巧妙消维DP】【HDU2059】龟兔赛跑
查看>>
(转)软件开发和团队”最小模式”初探2-6人模型(上)
查看>>
泛型类、泛型方法、类型通配符的使用
查看>>
知识分析作业(二)-----朴素贝叶斯
查看>>
2012CSU_ACM集训中期检测 简要题解
查看>>
DOS命令如何进入指定的下一级目录?
查看>>
python——continue的应用
查看>>
java基础之二分法查找
查看>>
二分查找+数学 HDOJ 4342 History repeat itself
查看>>
网络流
查看>>