记录一次sqlplus导出文件

【说明】本文档介绍通过sqlplus导出数据的办法

 

【1】远程桌面登录到服务器

 

【2】进行脚本的编辑,脚本文件为D:\export.sql,用记事本打开

注意:请注意修改导出文件的名称和导出条件

 
 

set termout off

set pagesize 0

set verify off

set echo off

set heading on;

spool D:\export\201413.csv #修改输出的文件名

select FKDAT||','||VKORG||','||KTGRM||','||FKIMG||','||NETWR||','||MWSBP||','||TOTAL FROM VW_TOTAL_R WHERE FKDAT='20140113'; #修改输出的条件,导出20140113这一天的数据

spool off

exit

 
 

 

【3】运行脚本

 
 

C:\Users\Administrator>sqlplus datachk/datachk@db1 #输入脚本

 

SQL*Plus: Release 11.2.0.1.0 Production on 星期一 4月 6 10:33:58 2015

 

Copyright (c) 1982, 2010, Oracle. All rights reserved.

 

 

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> @d:\export.sql 输入脚本

从 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options 断

 

【4】 导出的结果文件,在D:export下面

227659435

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12679300/viewspace-1754090/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12679300/viewspace-1754090/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值