在SQLPLUS中删除不需要/多余的数据 [英] Remove Unwanted/Extra Data in SQLPLUS

查看:199
本文介绍了在SQLPLUS中删除不需要/多余的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过批处理文件运行文件

I am running a file via batch file

批处理文件:

sqlplus admin/admin@SERVER @abc.sql > output.txt

SQL文件abc.sql:

SQL File abc.sql:

set PAGESIZE 1000
set LINESIZE 550
set echo off
set head off
set FEEDBACK OFF
select * from S_ABC
exit;

Output.txt:

Output.txt:

Connected To:
Oracle Database 11g................................
.
.
.
DATA
.
.
Disconnected from Oracle Database 11g .......
.
.

请帮助我删除output.txt文件开头和结尾的多余数据.

Please help me remove the extra data, in the starting and end of output.txt file.

推荐答案

-S似乎正是您所要的;

-S seems to be what you're looking for;

sqlplus -S admin/admin@SERVER @abc.sql > output.txt

-S [ILENT]

禁止显示所有SQL * Plus信息和提示消息,包括命令提示符,命令回显以及启动SQL * Plus时通常显示的横幅.如果您省略用户名或密码,则SQL * Plus会提示您输入用户名或密码,但是这些提示是不可见的.使用SILENT在另一个程序中调用SQL * Plus,以便用户看不到SQL * Plus的使用.

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中删除不需要/多余的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆