次の mysql クエリがありますが、構文エラーが発生します。
「フィールド リスト」の不明な列「k.Fund_Name」
Dreamweaver は構文エラーを反映しません。ブラウザのみ。
$result2 = mysql_query("
select
k.Fund_Name Title,
k.Fund_Yield_9 Year_9,
k.Fund_Yield_8 Year_8,
k.Fund_Yield_7 Year_7,
k.Fund_Yield_6 Year_6,
k.Fund_Yield_5 Year_5,
k.Fund_Yield_4 Year_4,
k.Fund_Yield_3 Year_3,
k.Fund_Yield_2 Year_2,
k.Fund_Yield_1 Year_1,
k.Fund_Yield_0 Year_0
from
( select
a.Fund_Name Fund_Name,
j.Fund_Yield Fund_Yield_9,
i.Fund_Yield Fund_Yield_8,
h.Fund_Yield Fund_Yield_7,
g.Fund_Yield Fund_Yield_6,
f.Fund_Yield Fund_Yield_5,
e.Fund_Yield Fund_Yield_4,
d.Fund_Yield Fund_Yield_3,
c.Fund_Yield Fund_Yield_2,
b.Fund_Yield Fund_Yield_1,
a.Fund_Yield Fund_Yield_0
from
( select A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_Minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 0 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) a
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 1 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) b on ( a.ID_CARTERA = b.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 2 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) c on ( a.ID_CARTERA = c.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 3 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) d on ( a.ID_CARTERA = d.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 4 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) e on ( a.ID_CARTERA = e.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 5 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) f on ( a.ID_CARTERA = f.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 6 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) g on ( a.ID_CARTERA = g.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 7 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) h on ( a.ID_CARTERA = h.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 8 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) i on ( a.ID_CARTERA = i.ID_CARTERA )
Left Outer Join ( select
A.ID_Cartera,
A.F_ANO Year,
H.DES_CARTERA_CC Fund_Name,
ROUND(A.POR_RENTABILIDAD, 2) Fund_Yield,
C.DES_CARTERA_CC Fund_Benchmark_Name,
ROUND(A.POR_RENTBENCH, 2) Fund_Benchmark_Yield,
D.DES_CARTERACLASE Class_Name,
ROUND(G.POR_RENTABILIDAD, 2) Class_Yield,
E.DES_CARTERACLASE_ESP Special_Class_Name,
ROUND(F.POR_RENTABILIDAD, 2) Special_Class_Yield,
ROUND(A.POR_RENTMENOSBENCH, 2) Plus_minus_Benchmark,
ROUND(A.POR_RENTMENOSCLASE, 2) Plus_Minus_Class,
ROUND(A.POR_RENTMENOSCLASEESP, 2) Plus_Minus_Special_Class,
ROUND(A.POR_PERCENTILCLASE, 2) Percentile_Class,
ROUND(A.POR_PERCENTILCLASEESP, 2) Percentile_Special_Class
from dr_rent_carteras_anos A
Join det_refcru_carterasbench B on ( A.ID_CARTERA = B.ID_CARTERA )
Join mcarteras C on ( B.ID_CARTERABENCH = C.ID_CARTERA )
Join mcarteras_clases D on ( A.ID_CARTERACLASE = D.ID_CARTERACLASE )
Join mcarteras_clasesesp E on ( A.ID_CARTERACLASE_ESP = E.ID_CARTERACLASE_ESP )
Join dr_rent_clasesesp_anos F on ( A.F_ANO = F.F_ANO and E.ID_CARTERACLASE_ESP = F.ID_CARTERACLASE_ESP )
Join dr_rent_clases_anos G on ( A.F_ANO = G.F_ANO and D.ID_CARTERACLASE = G.ID_CARTERACLASE )
Join mcarteras H on ( A.ID_CARTERA = H.ID_CARTERA )
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
And A.F_ANO = ( select MAX(F_ANO ) - 9 from dr_rent_carteras_anos where ID_CARTERA = $ID_CARTERA ) ) j on ( a.ID_CARTERA = j.ID_CARTERA ) ) K
")
or die(mysql_error());