ORA-00904: "T1"."TOT_COSTS_UPLIFTED_FUEL_QTY": invalid identifier
SHANOJOct 4 2012 — edited Oct 4 2012 Please help to solve this error: ORA-00904:
SQL> select "c31" "c1", "c30" "c2", "c28" "c4", "c29" "c6", "c25" "c8", "c34"
2 "c10", 3.4592 "c12", "c35" "c14", case when "c27"<>0 and "c28"<>0 then
3 ("c27"*"c35")*"c25" else 0 end "c16", "c26" "c18", ("c25"*1.0e0)/"c34"
4 "c20", "c33" "c22", "c32" "c23"
5 from (select T1."NAME" "c24", (sum
6 (T1."TOT_COSTS_UPLIFTED_FUEL_QTY")*1.0e0)/sum(T1."FUEL_UPLIFTED_QTY")
7 "c25", DECODE(sum(T3."BUDGET_UPLIFT_VOLUME"),NULL,0 - sum
8 (T1."FUEL_UPLIFTED_QTY") ,sum(T3."BUDGET_UPLIFT_VOLUME") - sum
9 (T1."FUEL_UPLIFTED_QTY")) "c26", sum(T1."FUEL_UPLIFTED_QTY") "c27", sum
10 (T1."TOT_COSTS_UPLIFTED_FUEL_QTY") "c28", sum
11 (T1."TOT_COSTS_UPLIFTED_FUEL_QTY") - sum(T1."CONS_FUEL_QTY_COSTS") "c29",
12 sum(T1."CONS_FUEL_QTY_COSTS") "c30"
13 from (("FISMGR"."FLIGHT_INFO_VIEW" T1 LEFT OUTER JOIN
14 "FISMGR"."COGNOS_XCHG_RATE" T2 on T1."DELIVERY_YEAR"=T2."YEAR" and
15 T1."DELIVERY_MONTH"=T2."MONTH") LEFT OUTER JOIN
16 "FISMGR"."COGNOS_FUEL_BUDGET" T3 on T1."ROUTE"=T3."ROUTE" and
17 T1."SECTOR"=T3."SECTOR" and T1."AC_KLASSE"=T3."AC_CLASSE" and
18 T1."FLIGHT_MONTH"=T3."MONTH" and T1."FLIGHT_YEAR"=T3."YEAR") LEFT OUTER
19 JOIN "FISMGR"."MV_AREA" T4 on T1."DEPARTURE"=T4."STATIONSCODE"
20 where T4."AREA_CODE" in ('DOM', 'INTL') and T1."FISCAL_YEAR"=2012 and
21 TO_NUMBER(TO_CHAR(T1."FLIGHT_DATE" ,'MM'))=8
22 group by T1."NAME") D3, (select T1."NAME" "c31", T1."FUEL_UPLIFTED_QTY"
23 "c32", T1."FLIGHT_DATE" "c33", T2."USD_XCHG_RATE" "c34", 3.4592 -
24 T2."USD_XCHG_RATE" "c35"
25 from (("FISMGR"."FLIGHT_INFO_VIEW" T1 LEFT OUTER JOIN
26 "FISMGR"."COGNOS_XCHG_RATE" T2 on T1."DELIVERY_YEAR"=T2."YEAR" and
27 T1."DELIVERY_MONTH"=T2."MONTH") LEFT OUTER JOIN
28 "FISMGR"."COGNOS_FUEL_BUDGET" T3 on T1."ROUTE"=T3."ROUTE" and
29 T1."SECTOR"=T3."SECTOR" and T1."AC_KLASSE"=T3."AC_CLASSE" and
30 T1."FLIGHT_MONTH"=T3."MONTH" and T1."FLIGHT_YEAR"=T3."YEAR") LEFT OUTER
31 JOIN "FISMGR"."MV_AREA" T4 on T1."DEPARTURE"=T4."STATIONSCODE"
32 where T4."AREA_CODE" in ('DOM', 'INTL') and T1."FISCAL_YEAR"=2012 and
33 TO_NUMBER(TO_CHAR(T1."FLIGHT_DATE" ,'MM'))=8) D2
34 where "c31"="c24" or "c31" is null and "c24" is null
35 order by "c1" asc
36 ;
(T1."TOT_COSTS_UPLIFTED_FUEL_QTY") - sum(T1."CONS_FUEL_QTY_COSTS") "c29",
*
ERROR at line 11:
ORA-00904: "T1"."TOT_COSTS_UPLIFTED_FUEL_QTY": invalid identifier