oracle导入数据datatable,如何将文本中的日期数据导入oracle的数据表的日期型字段中...

我按照http://www.eygle.com/archives/2005/07/eciousqlloadero.html

的步骤测试了一下,发现报错ORA-02248:

SQL> show user

USER 为"CJF"

SQL> create table T_LOAD

2  (

3  A VARCHAR2(10),

4  B VARCHAR2(10),

5  C DATE

6  );

表已创建。

其中e:\doc\contdate.ctl内容如下:

load data

infile 'e:\doc\date.txt'

badfile 't.bad'

append into table t_load

fields terminated by ','

trailing nullcols

(

a,

b,

c date "yyyy-mm-dd hh24:mi:ss"

)

而e:\doc\date.txt的内容如下:

aaaaa,xxxxx,2005-01-01 01:00:00

bbbbb,yyyyy,2005-03-01 12:00:00

ccccc,zzzzz,2005-12-01 18:00:00

E:\doc>dir date.txt

驱动器 E 中的卷是 DISK1_VOL3

卷的序列号是 7095-4785

E:\doc 的目录

2006-05-11  16:31                99 date.txt

1 个文件             99 字节

0 个目录  5,896,814,592 可用字节

E:\doc>dir contdate.ctl

驱动器 E 中的卷是 DISK1_VOL3

卷的序列号是 7095-4785

E:\doc 的目录

2006-05-11  16:33               171 contdate.ctl

1 个文件            171 字节

0 个目录  5,896,814,592 可用字节

E:\doc>

C:\Documents and Settings\new>set nls_lang=AMERICAN_AMERICA.ZHS16GBK

C:\Documents and Settings\new>sqlldr userid=cjf/cjf@cjf control='e:\doc\contdate

.ctl' log='e:\doc\sqlldrtdate.txt'

SQL*Loader: Release 9.2.0.1.0 - Production on Thu May 11 16:32:21 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL*Loader-128: unable to begin a session

ORA-00604: error occurred at recursive SQL level 1

ORA-02248: invalid option for ALTER SESSION

C:\Documents and Settings\new>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值