Chinaunix首页 | 论坛 | 博客
  • 博客访问: 615916
  • 博文数量: 825
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-27 14:19
文章分类

全部博文(825)

文章存档

2011年(1)

2008年(824)

我的朋友

分类:

2008-10-27 14:28:33

    这篇论坛主要介绍了如何在实际的应用环境中重复利用这个外部表的表结构,详细内容请参考下文。

    导数据,多次用到第3方的记事本数据(数据格式一致),常规的办法就是把记事本文件导到数据,或者为每个记事本建立个表,这样操作一来非常的麻烦,二来数据对象有很多,对数据库本身是个负担,今天报着试试看的态度,看能不能重复利用这个外部表的表结构;

    SQL> create table tmpdeal.ext_bus(

    2 sid varchar2(10),

    3 mob_num1 varchar2(15),

    4 mob_num2 varchar2(15),

    5 flag varchar2(2)

    6 )

    7 organization external(

    8 type oracle_loader

    9 default directory dic

    10 access parameters(

    11 records delimited by newline

    12 nobadfile

    13 nologfile

    14 fields terminated by '|'

    15 )

    16 location('xx1.txt')

    17 )reject limit unlimited;

    表已创建。

    SQL> alter table tmpdeal.ext_busfile location('xx2.txt');

    表已更改。

    SQL> alter table tmpdeal.ext_busfile location('xx2.txt');——

    表已更改。——果然OK

    SQL> alter table tmpdeal.ext_busfile location('xx3.txt');

    表已更改。

    SQL> alter table tmpdeal.ext_busfile location('xx4.txt');

    表已更改。

【责编:Ken】

--------------------next---------------------

阅读(286) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~