我需要從Case語句內的SQL Select語句獲取供應商ID。一旦我把A.SUPPLIER_ID
選擇語句,我得到一個錯誤。這個怎麼做?SQL Case語句錯誤無法選擇多個列
Select
CASE
WHEN TYPE = 1 THEN
(
SELECT A.name
from BIZZXE_V2_SCH.SUPPLIERS A
where A.SUPPLIER_ID = 30
)
ELSE
(
SELECT A.name
from BIZZXE_V2_SCH.STOCK_SUPPLIER A
where A.SUPPLIER_ID = 31
)
END name
from DUAL;