--旧库列举所有类型航图
select distinct c.identifier airport_icao,d.sc_code chart_type,s.name
from special_chart s, airport c, special_chart_type d
where
c.isdirectory=1 and c.bureau_id<8 and
c.airport_id=s.airport_id and s.sc_type_id=d.sc_type_id
and d.sc_code='机场图_停机位置图'
order by s.name
--旧库排除文件Bolb字段后的查询语句
select c.identifier airport_icao, d.sc_code chart_type, s.sc_id,s.sc_type_id,s.airport_id,s.name,s.chart_filename,s.status,s.publish_type,s.create_date,s.publish_date,s.remark,s.create_account,s.effect_date,s.is_modified,s.catagory,s.usestate,s.modifyreason,s.referencefile,s.frontorback,s.last_modified_time,s.pdf_name,s.special_chart_seq,s.pagenumber,s.last_modified_account,s.ischecklist,s.isspecial,s.islandscape
from special_chart s, airport c, special_chart_type d
where c.isdirectory=1 and c.bureau_id<8 and c.airport_id=s.airport_id and s.sc_type_id=d.sc_type_id
order by c.identifier
--新库顺序列举航图类型
select * from TERMINAL_CHART_TYPE t
order by nvl(t.parent_type_id,0),t.seq_num
--新库中插入新航图类型
insert into TERMINAL_CHART_TYPE values((select max(chart_type_id)+1 from TERMINAL_CHART_TYPE),3,'离场图_VOR',3,null)