删除 SQLPLUS 中的 Unwanted/Extra 数据
Remove Unwanted/Extra Data in SQLPLUS
我是运行通过批处理文件
批处理文件:
sqlplus admin/admin@SERVER @abc.sql > output.txt
SQL 文件 abc.sql:
set PAGESIZE 1000
set LINESIZE 550
set echo off
set head off
set FEEDBACK OFF
select * from S_ABC
exit;
Output.txt:
Connected To:
Oracle Database 11g................................
.
.
.
DATA
.
.
Disconnected from Oracle Database 11g .......
.
.
请帮我删除 output.txt 文件开头和结尾的多余数据。
-S
似乎是你要找的东西;
sqlplus -S admin/admin@SERVER @abc.sql > output.txt
Suppresses all SQL*Plus information and prompt messages, including the command prompt, the echoing of commands, and the banner normally displayed when you start SQL*Plus. If you omit username or password, SQL*Plus prompts for them, but the prompts are not visible. Use SILENT to invoke SQL*Plus within another program so that the use of SQL*Plus is invisible to the user.
我是运行通过批处理文件
批处理文件:
sqlplus admin/admin@SERVER @abc.sql > output.txt
SQL 文件 abc.sql:
set PAGESIZE 1000
set LINESIZE 550
set echo off
set head off
set FEEDBACK OFF
select * from S_ABC
exit;
Output.txt:
Connected To:
Oracle Database 11g................................
.
.
.
DATA
.
.
Disconnected from Oracle Database 11g .......
.
.
请帮我删除 output.txt 文件开头和结尾的多余数据。
-S
似乎是你要找的东西;
sqlplus -S admin/admin@SERVER @abc.sql > output.txt
Suppresses all SQL*Plus information and prompt messages, including the command prompt, the echoing of commands, and the banner normally displayed when you start SQL*Plus. If you omit username or password, SQL*Plus prompts for them, but the prompts are not visible. Use SILENT to invoke SQL*Plus within another program so that the use of SQL*Plus is invisible to the user.