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

本文共 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

你可能感兴趣的文章
Java中File类如何扫描磁盘所有文件包括子目录及子目录文件
查看>>
VC++ 限制窗口的大小范围的方法
查看>>
结对开发-返回一个整数数组中最大子数组的和(首尾相接版)
查看>>
meanshift-聚类
查看>>
不要if else的编程
查看>>
rn.ShowDialog() == DialogResult.OK
查看>>
20160519
查看>>
SCU 3132(博弈)
查看>>
正则表达式
查看>>
delete archivelog all 无法彻底删除归档日志?
查看>>
Redis五大数据类型
查看>>
大型分布式网站架构技术总结
查看>>
矩阵求导与投影梯度相关问题
查看>>
SVN
查看>>
C语言编程写的一个http下载程序(王德仙)2012-04-08
查看>>
CCF201409-3 字符串匹配(100分)
查看>>
UVALive2203 UVa10042 Smith Numbers【质因数分解+素数判定+数位之和】
查看>>
Project Euler Problem 9: Special Pythagorean triplet
查看>>
HDU5701 中位数计数【中位数】
查看>>
Python 深浅拷贝 (Shallow copy and Deep copy in Python)
查看>>