0
我在嘗試將此代碼從SQL Server遷移到Oracle,但出現很多錯誤;請任何人都可以幫助我?將表變量從SQL Server 2008 R2遷移到Oracle 11g
代碼在SQL Server:
DECLARE @tblFacultad TABLE
(IdFacultad INT,
NomFacultad VARCHAR(200)
);
INSERT INTO @tblFacultad (IdFacultad, NomFacultad)
SELECT IdFacultad, NomFacultad
FROM FACULTAD_local
SELECT * FROM @tblFacultad
代碼在Oracle中:
CREATE OR REPLACE TYPE objFacultad AS OBJECT
(
IdFacultad NUMBER,
NomFacultad varchar(255)
)
/
CREATE OR REPLACE TYPE tblFacultad is table of objFacultad;
/
SELECT IDFACULTAD,NOMFACULTAD BULK COLLECT INTO tblFacultad FROM FACULTAD;
當我運行在Oracle中的代碼,我得到這個錯誤:
ORA-03001: unimplemented feature
03001. 00000 - "unimplemented feature"
*Cause: This feature is not implemented.
*Action: None.
Error en la línea: 11, columna: 54
[PL/SQL Developer](https://www.allroundautomations.com/plsqldev.html)是一個使用Oracle SQL和PL/SQL的桌面工具,類似於[SQL Developer](http:// www .oracle.com/technetwork/developer-tools/sql-developer/what-is-sqldev-093866.html)或Toad。我認爲你在這裏問的是[Oracle SQL](http://www.oracle.com/technetwork/database/database-technologies/sql/overview/index.html)。 –