易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle导入文本文件

1.使用sqlldr
2.首先建立相应的表
create table test(ip1 number, ip2 number, locate varchar2(512),country varchar2(60),province varchar2(60),city varchar2(60))
3.写控制文件 city.ctl
load data
infile 'c:\city.txt'
append into table test
--when country='中国'
fields terminated by ','
(
ip1,
ip2,
locate,
country,
province,
city
)
4.通过sqlldr加载数据
sqlldr user/pass@orcl251 control=c:\city.ctl log=c:\logfile.txt bad=c:\badfile.txt  discard=c:\discardfile.txt


相关文档:

oracle uptime的bug

症状:oracle sqlplus没反应
oracle10g的有十几个机器客户端10.2.0.1.0,执行sqlplus这个命令没反映。此时cpu使用为99.9%,观察了一会,不释放。
oracle其他命令都好使。
环境变量、ping tnsname等都没问题。。且这些机器都是至少运行了200多天左右,
但一旦重启OS就好使了。。
或者不重启OS,换成9i的客户端,sqlplus ......

用sqlplus为oracle创建用户和表空间


 用Oracle9i自带的企业管理器或PL/SQL图形化的方法创建表空间和用户以及分配权限是相对比较简单的,本文要介绍的是另一种方法,使用Oracle 9i所带的命令行工具:SQLPLUS来创建表空间,这个方法用起来更加简明快捷。
       
        假设 ......

Oracle Schema Objects

Introduction to Schema Objects
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types o ......

[转]Oracle 随机获取N条数据


当我们获取数据时,可能会有这样的需求,即每次从表中获取数据时,是随机获取一定的记录,而不是每次都获取一样的数据,这时我们可以采取Oracle内部一些函数,来达到这样的目的.   
  
   1) select * from (select * from tablename order  ......

ORACLE to_char函数详解


The following are number examples for the to_char
function.
to_char
(1210.73,
'9999.9')
would return '1210.7'
to_char
(1210.73,
'9,999.99')
would return '1,210.73'
to_char
(1210.73,
'$9,999.00')
would return
'$1,210.73'
to_char
(21,
'000099')
would return '000021'
The foll ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号