zoukankan      html  css  js  c++  java
  • V_REPORT_AOC_FUEL]

    select * from DISPATCH order by FLTID desc
    SELECT TOP 1000 [FLTID]
          ,[VIP_ID]
          ,[VIP_NAME]
          ,[GENDER]
          ,[VIP_POS]
          ,[VIP_AGE]
          ,[VIP_HOBBY]
          ,[VIP_REMARK]
          ,[PHOTO]
          ,[VIP_TYPE]
          ,[VIP_CONTACT]
      FROM [ISA].[dbo].[V_FLIGHTS_VIPS]
      
    select top 1  * from AIRLINES_FLighttime
    order by ACTYPE,SEASON 
    Select * from Dispatch
    
    select * from v_REPORT_AOC
    
    CREATE VIEW [dbo].[V_REPORT_AOC_FUEL]
    /*-------------------------------------------------------------------------------
    创建时间: 04/03/2015 17:00:48     
    用途: 统计 
    创建人 :        
     ----------------------------------------------------------------------------------*/     
    
    AS
    
    SELECT 
    日期    =DBO.PEK_OPS_Date(A.STD),
    航班号  =RIGHT(A.FLTNO,LEN(A.FLTNO) - 2) ,
    飞机    =RIGHT(AC, 5),
    机型    =LEFT(AC,4),
    起飞机场=A.DEPSTN ,
    目的机场=A.ORIARRSTN,
    计划起飞=DBO.ShortTime(DBO.PEKTime(A.STD)),
    实际起飞=DBO.ShortTime(DBO.PEKTime(A.ATD)),
    计划落地=DBO.ShortTime(DBO.PEKTime(A.STA)),
    实际落地=DBO.ShortTime(DBO.PEKTime(A.ATA)),
    CFP耗油 = CASE WHEN c.CFP IS NULL then 0 else c.TRIP_FUEL   END,
    航线耗油= CASE WHEN c.CFP IS NULL then 
                        case when c.TRIP_FUEL IS NULL then
                                  g.TRIP_FUEL else c.TRIP_FUEL
                        end 
                     ELSE  0 
                   END
     from FLIGHTS a left join Dispatch c on c.FLTID=a.FLTID
     left join  (select D.SEASON,D.ACTYPE,D.TRIP_FUEL,E.DEPSTN,E.ARRSTN  from AIRLINES_Routes_Fuel D ,AIRLINES_ROUTES e
                 WHERE E.ROUTE_ID=d.ROUTE_ID) AS G 
                 ON   A.DEPSTN=g.DEPSTN and a.ARRSTN=g.ARRSTN and
                     dbo.GetSeason(a.STD)=g.season AND LEFT(A.AC,4)=G.ACTYPE
     where a.status<>'CNL'and ETD > '2015-04-01 00:00:00'
     
     
    
    
      
         
        
          
          
          
  • 相关阅读:
    python多线程多进程
    python单元测试unittest
    python学习笔记(一):python简介和入门
    今天的收获!!!
    Python django
    React router
    30分钟掌握ES6/ES2015核心内容
    webpack+React.js
    我喜欢的两个js类实现方式 现在再加上一个 极简主义法
    js实现的笛卡尔乘积-商品发布
  • 原文地址:https://www.cnblogs.com/moonwind/p/4515516.html
Copyright © 2011-2022 走看看