报这个错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