标题:报这个错single-row subquery returns more than one row,求高手解决
取消只看楼主
zfxueheng
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-8-9
结帖率:50%
已结贴  问题点数:10 回复次数:0 
报这个错single-row subquery returns more than one row,求高手解决
select a.FLIGHT_DATE, a.CREW_LINK_LINE, nvl(a.DEP_NAME, 'δ֪') DEP_NAME,a.P_CODE,
       Decode(a.Ts_Flag,'X','A','Y','*','Z','B','S','S','P','P','U','*','') || a.C_NAME || a.TECH_NAME ||
       Decode(a.TECH_NO,'PT', 'I', 'PTS', 'I', 'PP', 'C3', 'P1', 'C2','PN', 'C1', a.TECH_NO) C_NAME,
       a.Ts_Flag, a.FJS_ORDER, a.RANK_NO, a.TECH_NO
  From (SELECT T3005.FLIGHT_DATE,
               T3005.CREW_LINK_LINE,
               (SELECT T3018_A.DEP_NAME
                  FROM T3018_A
                 WHERE T3018_A.DEP_CODE = T3017.DEP_CODE1) DEP_NAME,
               T3005.P_CODE,T3017.C_NAME,T3005.Ts_Flag,T3005.FJS_ORDER,T3005.RANK_NO,
                 trim((SELECT T3009.TECH_NO1
                      FROM t3009, T4007
                     WHERE t3009.p_code = T3017.P_CODE
                       AND T3009.AIRCRAFT_TYPE = T4007.AC_TYPE_LONG
                       AND T4007.AC_TYPE_SHORT = T3001.AC_TYPE
                       AND tech_no1 IS NOT NULL)) TECH_NO,
               trim((SELECT T3021.TECH_NAME
                      FROM t3009, t3021
                     WHERE T3021.TECH_NO = T3009.TECH_NO2
                       AND tech_no2 IS NOT NULL)) TECH_NAME
          FROM T3001, T3005, T3017
         WHERE T3001.FLIGHT_DATE = T3005.FLIGHT_DATE
           AND T3001.CREW_LINK_LINE = T3005.CREW_LINK_LINE
           AND T3005.P_CODE = T3017.P_CODE
           AND T3017.DUTY_CODE = 'F') a
搜索更多相关主题的帖子: one returns 
2012-09-17 08:53



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-381543-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.418949 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved