Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File sqlplus保存到文件在大字段上不起作用_File_Batch File_Views_Sqlplus - Fatal编程技术网

File sqlplus保存到文件在大字段上不起作用

File sqlplus保存到文件在大字段上不起作用,file,batch-file,views,sqlplus,File,Batch File,Views,Sqlplus,我想要的是:运行.bat文件将视图脚本保存到文件中 我尝试的是:我用一个.bat文件 sqlplus blabla@blaip/bla @"C:\Documents and Settings\New user\Desktop\New Folder\sqlplus\some.sql" pause 以及包含以下内容的.sql文件: SET TERMOUT OFF; SPOOL "C:\Documents and Settings\New user\Desktop\New Folder\sqlpl

我想要的是:运行.bat文件将视图脚本保存到文件中

我尝试的是:我用一个.bat文件

sqlplus blabla@blaip/bla @"C:\Documents and Settings\New user\Desktop\New Folder\sqlplus\some.sql"
pause
以及包含以下内容的.sql文件:

SET TERMOUT OFF; 
SPOOL "C:\Documents and Settings\New user\Desktop\New Folder\sqlplus\res.txt"
select  text from all_views where view_name LIKE 'V_NOK_ALL_2G_BTS';
SPOOL OFF
exit
问题是:文本字段似乎是一个备忘录,sqlplus只显示前6行


救命啊

该列可能是CLOB或LONG数据类型

尝试将
SET LONG 10000
添加到.sql脚本的顶部。这个数字可以调整,但我相信是有限度的


您还可以使用
设置行大小300
(任何适合您的大小)来增加行大小

您还应该修剪尾随空格

SET TRIMOUT ON
从屏幕输出修剪尾随空白


打开TRIMSPOOL
从假脱机输出修剪尾随空白。

谢谢dbenham,但现在新的显示格式是:

text
---------------------------------------------------------------
drop view blabla;
create view blabla(
  col1 int,
  col2 int,
  col3 int,
as ( select col1, col2, co
text
---------------------------------------------------------------
l3 from table1
....
我已经实现了设置PAGESIZE 10000,使分隔符

text
---------------------------------------------------------------
消失并显示每个脚本的连续文本,但

  • 碎片!!!在上面的示例中,co\r\nl3非常糟糕!:(

我注意到这个问题与每行80个字符的命令行有关,spool复制提示符中显示的所有内容:(包括行尾之间的空格(来自结果)对于实际的\r\n;f*in-crap

这应该是对您的问题的编辑,或者是对我的答案的评论,如果您能让它适合的话(不太可能)。