0
是否可以將某些數據選擇到用戶定義的集合中?我創建了與查詢返回相同的記錄結構,然後嘗試將數據選擇到我的表中。Oracle - 選擇(複雜查詢)到用戶定義的集合中
procedure MY_PROC(md number, pPERIOD date) is
TYPE MainRecType IS RECORD (
addr varchar2(100),
custom x_custom_table.custom%type,
id_cn number,
iddb_cn number
);
TYPE MainTable IS TABLE OF MainRecType
INDEX BY BINARY_INTEGER;
begin
select * bulk collect into MainTable from //ERROR!
(
select a.address addr, x.custom custom, b.id id_cn, b.id_db iddb_cn
from AddressTable a, x_custom_table x, BuildTable b
where a.id_build=b.id and a.id_x=x.id and b.period=pPeriod and b.md=md
);
end;
它說PLS-00321: expression 'MainTable' is inappropriate as the left hand side
。如果可能的話,我做錯了什麼?
我無法想象它是如此愚蠢的錯誤!謝謝。 – Nolesh