Chinaunix首页 | 论坛 | 博客
  • 博客访问: 298798
  • 博文数量: 22
  • 博客积分: 674
  • 博客等级: 上士
  • 技术积分: 792
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-19 00:48
文章存档

2013年(2)

2012年(20)

我的朋友

分类: Oracle

2012-05-21 22:47:00

  在使用AQT工具为Oracle数据导入数据时,如下图所示:

点击(此处)折叠或打开

  1. Insert error. Row=2 error. S0002(942)[Oracle][ODBC][Ora]ORA-00942: table or view does not exist
  2. Load terminated at row 2 due to error. Loaded OK=0. Dups rejected=0. Other error=1
  这是因为导入的表“不存在”,之所以说“不存在”,是因为创建表的时候加了双引号(上一篇有关Oracle的博客中有提到Oracle建表有加双引号和无双引号的两种情况)如创建表语句如下:

点击(此处)折叠或打开

  1. create table FOODMART."sales_fact_1997"(            //有双引号
  2.     product_id NUMBER not null,
  3.     time_id NUMBER not null,
  4.     customer_id NUMBER not null,
  5.     promotion_id NUMBER not null,
  6.     store_id NUMBER not null,
  7.     store_sales NUMBER(10,4) not null,
  8.     store_cost NUMBER(10,4) not null,
  9.     unit_sales NUMBER(10,4) not null)
而实际上导入文件的文件名没有带双引号而且不允许带,所以只需将原表删除,而后创建一个不带双引号的表,接着在导入,这样问题就解决了!
阅读(6410) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

皮娃娃哈哈2012-05-23 11:28:32

呵呵,不错的经验,学习了!!