我是Oracle新手并尝试创建catagories
的表格。该表格精细创建并精细改变:
CREATE TABLE CATAGORIES
( Code VARCHAR2(10) NOT NULL,
CategoryName VARCHAR2(250),
Active VARCHAR2(1))
/
ALTER TABLE CATAGORIES ADD CONSTRAINT PK_CATAGORIES PRIMARY KEY(CODE)
/
但是在插入时会发生这些错误:
INSERT INTO CATAGORIES(Code,CategoryName,Active)
select LPAD(ROWNUM,5,'0') AS Code, Category,'Y'
from
(
SELECT count(Product),Replace(Category,'"','') as Category from TEMPDATA_EXT
Where Category!='Category'
group by Category
)
SQL> INSERT INTO CATAGORIES(Code,CategoryName,Active)
2 select LPAD(ROWNUM,5,'0') AS Code, Category,'Y'
3 from
4 (
5 SELECT count(Product),Replace(Category,'"','') as Category from TEMPDATA_EXT
6 Where Category!='Category'
7 group by Category
8 )
9 /
INSERT INTO CATAGORIES(Code,CategoryName,Active)
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "skip": expecting one of: "column, enclosed, (,
ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim, reject"
KUP-01007: at line 3 column 4
答案 0 :(得分:1)
此错误表示外部表存在问题。
ORA-29913:执行ODCIEXTTABLEOPEN时出错
因此我们可以猜测INSERT语句中引用的TEMPDATA_EXT
是外部表。所以问题不在于CATEGORIES
表,而在于您从中选择的表。
可能有几件事情:
外部表应该指定了日志文件和错误文件。这些都写入OS目录。你的第一个动作应该是看他们。使用ALL_EXTERNAL_TABLES view will give you the database directory。要查找操作系统目录,您需要将其与the ALL_DIRECTORIES view交叉引用。