请大家帮我以下吗?
[![在此处输入图片描述] [1]] [1]
在执行我附加的脚本的select语句时,出现上述错误。在屏幕截图中,我突出显示了选择语句,该错误提示了我。
CREATE TYPE exchanges_traded AS VARRAY(3) OF VARCHAR2(25)
/
CREATE TYPE stock_t AS OBJECT(
company VARCHAR(15),
currentPrice NUMBER(8,2),
exchanges exchanges_traded,
lastDividend NUMBER(4,2),
eps NUMBER(4,2)
)
/
CREATE TYPE address_t AS OBJECT(
streeetNo NUMBER(3),
streetName VARCHAR(8),
suburb VARCHAR(10),
state VARCHAR(12),
pin NUMBER(5)
)
/
CREATE TYPE investment_t AS OBJECT(
company REF stock_t ,
purchasePrice NUMBER(8,2),
invdate DATE,
quantity NUMBER(10)
)
/
CREATE TYPE investment_list AS TABLE OF investment_t
/
CREATE TYPE clients_t AS OBJECT(
name VARCHAR(25),
address address_t,
investments investment_list
)
/
CREATE TABLE stocks OF stock_t(
CONSTRAINT companyName_pk PRIMARY KEY(company)
)
/
CREATE TABLE clients OF clients_t(
CONSTRAINT clientName_pk PRIMARY KEY(name)
)NESTED TABLE investments STORE AS investment_tab
/
select e.COLUMN_VALUE exchange from stocks s, TABLE(s.exchanges) e
/
ALTER TABLE investment_tab ADD SCOPE FOR (company) IS stocks
/
INSERT INTO stocks VALUES(stock_t('BHP',10.50, exchanges_traded('Sydney','NewYork'), 1.50, 3.20))
/
INSERT INTO stocks VALUES(stock_t('IBM',70.00,exchanges_traded('NewYork','London','Tokyo'),4.25,10.00))
/
INSERT INTO stocks VALUES(stock_t('INTEL',76.50,exchanges_traded('NewYork','London'),5.00,12.40))
/
INSERT INTO stocks VALUES(stock_t('FORD',40.00,exchanges_traded('NewYork'),2.00,8.50))
/
INSERT INTO stocks VALUES(stock_t('GM',60.00,exchanges_traded('NewYork'),2.50,9.20))
/
INSERT INTO stocks VALUES(stock_t('INFOSYS',45.00,exchanges_traded('NewYork'),3.00,7.80))
/
INSERT INTO clients VALUES(clients_t('John Smith',address_t(3,' East Av','Bentley','WA', 6102),investment_list(investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'BHP'),12.00,'02-OCT-01',1000),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'BHP'),10.50 ,'08-JUN-02',2000),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'IBM'),58.00,'12-FEB-00',500),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'IBM'),65.00,'10-APR-01',1200),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'INFOSYS'),64.00,'11-AUG-01',1000))))
/
INSERT INTO clients VALUES(clients_t('Jill Brody',address_t(42,'Bent St','Perth','WA', 6001),investment_list(investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'INTEL'),35.00,'30-JAN-00 ',300),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'INTEL'),54.00,'30-JAN-01',400),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'INTEL'),60.00,'02-OCT-01',200),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'FORD'),40.00,'05-OCT-99 ',300),
investment_t((SELECT REF(s) FROM stocks s WHERE s.company = 'GM'),55.50,'12-DEC-00',500))))
/
select c.name , c.address , i.company,i.purchasePrice,i.invdate,i.quantity
from clients c , table(c.investments)i
/
select c.name , i.purchasePrice
from clients c , table(c.investments)i
/
我一直为此苦苦挣扎。请帮助
谢谢