-1
我有以下SQL:SQL爲什麼這個連接不起作用?
SELECT tab4.IRSpot as IRSpot, tab4.IRVol AS MaxPlauShift, tab4.VegElement AS MaxPlauLoss FROM
(SELECT tab1.IRSpot, MIN(tab1.VegaElement*Probability) AS PlausibleLoss FROM
(SELECT IRSpot, IRVol, VegaElement
FROM SEL_VegaElementMatrix()) tab1
JOIN
(SELECT IRSpot, IRVol, Probability
FROM Table_Name_2) tab2
ON tab1.IRSpot = tab2.IRSpot AND tab1.IRVol = tab2.IRVol
GROUP BY tab1.IRSpot) tab3
JOIN
(SELECT IRSpot, IRVol, VegaElement
FROM SEL_VegaElementMatrix()) tab4
ON tab3.PlausibleLoss = tab4.VegaElement AND tab3.IRSpot = tab4.IRSpot
TAB3返回一行{2,0}和TAB4返回多行,這些含有相同的值{2,0}八強。
我期待我的連接返回八行結果,因爲我正在執行連接但我只返回一個結果行?
爲什麼你刪除了你的問題的主體!?我已回滾顯示您接受答案的問題。 – MatBailie