发生的问题是:错误代码:1301 数据集配置错误Query:ORA-00936: 缺失表达式

sql脚本如下:
select operatorUser 签派员,
               GetFlightReleaseCancel(${startDate},${endDate},${operatorName}) 个人放行取消航班,
               GetReleaseAlternateReturn('VC',${startDate},${endDate},${operatorName}) 个人放行备降航班,
               GetReleaseAlternateReturn('RC',${startDate},${endDate},${operatorName}) 个人放行返航航班 ,
               GetReleaseNormalFlights(${startDate},${endDate},${operatorName}) 个人放行正常航班,
               GetReleaseAllFlights(${startDate},${endDate},${operatorName}) 个人放行所有航班,
               GetReleaseNormalRate(${startDate},${endDate},${operatorName})||'%' 个人签派放行正常率,
               GetAlternateReturnRate${startDate},${endDate},${operatorName})||'%' 个人返航备降率,
               GetReleaseNormalFlightsRate(${startDate},${endDate},${operatorName})||'%' 放行正常率,
               GetReleaseAbnormalFlights(${startDate},${endDate},${operatorName}) 不正常航班,
               GetReleaseDelayNormalFlights(${startDate},${endDate},${operatorName}) 延误放行正常  
       from V_Dispatchers_Release  group by operatorUser


${startDate},${endDate},${operatorName}是自定义的模板参数。在调用自定义函数传参时出现异常信息如下:

发生的问题是:错误代码:1301 数据集配置错误Query:ORA-00936: 缺失表达式。
FineReportandyWqh 发布于 2016-4-11 09:34
悬赏:2 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共10回答
最佳回答
0
风起了发布于2016-4-11 09:34(编辑于 2023-9-6 09:34)
555
最佳回答
0
gxy120313发布于2016-4-11 09:51(编辑于 2023-9-6 09:34)
555
最佳回答
0
风起了发布于2016-4-11 10:50(编辑于 2023-9-6 09:34)
555
  • andyWqh andyWqh(提问者)

    你意思是将${startDate}转换成dateTime类型吗?
    部分sql如下:
    create or replace function GetReleaseAbnormalFlights(startDate in date,endDate in date,operatorUser in varchar2)

      return number

      is countRecord number;

      begin

        countRecord :=0;

      select count(*) into countRecord from

      (

         select a.operatorName,a.std

              from V_PlanReleaseFlights a, t2002 b

             where a.adjust_type <>\'3\'

               and (a.flg_cs is null or a.flg_cs <>\'C\')

               and a.flight_id = b.flight_id

               and a.ata is not null  and a.flg_vr is null

               and a.flg_delay = \'D\'

               and (b.remark not like \'%补足过站%\' or b.remark is null)

               and (b.remark not like \'%晚截载%\' or b.remark is null)

               and (nvl(a.atd,a.etd) - a.std) * 24 * 60 >= (select temp.delay_allow_time from t7001 temp where temp.airport_4code =a.departure_airport)

               and  (a.ata - a.sta) * 24 * 60 > 10

            union all

            ---返航备降
            select c.operatorName,c.std

               from V_PlanReleaseFlights c

               where  (c.flg_cs is null or c.flg_cs <>\'C\')

                 and c.flg_vr in (\'VC\', \'RC\')and c.FLG_PATCH IS NULL

            union all
            ---取消航班
            select ttc.operatorName,ttc.std from V_PlanReleaseFlights ttc

              where ttc.flg_cs = \'C\' and ttc.atd is null

            union all
            ---改航
            select tt.operatorName,tt.std

              from V_PlanReleaseFlights tt

             where (tt.flg_cs is null or tt.flg_cs <>\'C\')

               and tt.flg_vr is null

               and tt.adjust_type = \'3\'
       )
       where std between trunc(startDate)+20/24 and trunc(endDate)+20/24

               and operatorName = operatorUser;

       return countRecord;

    end GetReleaseAbnormalFlights;
    回复
    2016-04-11 12:23 
最佳回答
0
andyWqh发布于2016-4-11 12:19(编辑于 2023-9-6 09:34)
555
最佳回答
0
andyWqh发布于2016-4-11 12:23(编辑于 2023-9-6 09:34)
555
最佳回答
0
404177716发布于2016-4-11 13:53(编辑于 2023-9-6 09:34)
555
最佳回答
0
风起了发布于2016-4-11 14:31(编辑于 2023-9-6 09:34)
555
最佳回答
0
兔子酱发布于2016-4-11 16:46(编辑于 2023-9-6 09:34)
555
最佳回答
0
andyWqh发布于2016-4-11 16:55(编辑于 2023-9-6 09:34)
555
最佳回答
0
andyWqh发布于2016-4-11 16:56(编辑于 2023-9-6 09:34)
555
  • 0关注人数
  • 8129浏览人数
  • 最后回答于:2016-4-11 16:56
    活动推荐 更多
    热门课程 更多
    返回顶部