oracle通过query导出指定条件的数据

通过下面的方式oracle可以导出指定了条件的数据:

exp 
	mixcoaldb/mixcoaldb@server 
	tables=(shengcssjk) 
	query=\"where to_char(jiankdate, 'yyyy-mm') = '2014-05'\" 
	file=(
		E:\DB\shengcssjk201405_1.dmp, 
		E:\DB\shengcssjk201405_2.dmp, 
		e:\DB\shengcssjk201405_3.dmp
		) 
	filesize=4096M
	feedback=5000 
	log=E:\DB\shengcssjk_log.log

上面query指定了条件,切记在等号跟的条件使用双引号括起来的,而这两个双引号一定要加上“\”,不然会报错,如下:

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                      SHENGCSSJK
EXP-00056: 遇到 ORACLE 错误 911
ORA-00911: 无效字符
导出成功终止, 但出现警告。

  

posted @ 2014-06-05 15:15  尐sんΙ頭  阅读(1642)  评论(0编辑  收藏  举报