SQL * Plus中的清除屏幕

前端之家收集整理的这篇文章主要介绍了SQL * Plus中的清除屏幕前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在运行以下报告,但收到错误
/* Simple table formatting */

clear screen;
accept Report_File char prompt 'Enter a file name for summary report ';

/*Set up column headers*/
col StoreCode format A8 heading 'Store Code';
col DESCRIPTION format A8 heading 'Item Description';
col PRICE format $999999.99 heading 'Price';
col QUANTITY format 999 heading 'Quantity';
col (Price*Quantity) format $999999.99 heading 'Value';

/*Format and title pages */

set Pause off;
set Feedback off;
set Space 6;
set newpage 2;
set pagesize 54;
set linesize 200;
set underline =;
title center 'Current Stock Value by Store' skip 2 left -
            'prepared by Jason Kemeys' &Report_Officer right -
            &Todays_Date skip4;
btitle center format 999 sql.PNO;

/* Set breaks and computes */

break on StoreCode skip 2 on SuppCode skip 1 on Report;
compute sum of (Price*Quantity) on StoreCode;
compute sum of (Price*Quantity) on Report;

/*Select data & send to file*/

spool &Report_File;

select StoreCode,Description,Quantity,Price,(Price*Quantity)
from Stocks
order by StoreCode;

spool off;

/* Clear all settings */

clear breaks;
clear columns;
clear computes;
set Pause on;

只需要知道为什么它显示错误以及如何让它运行;第一次在sql中做报告.

这是我得到的错误

clear screen;
* ERROR at line 2: ORA-00900: invalid sql statement

解决方法

cl scr是用于在sql中清除屏幕的命令.
原文链接:https://www.f2er.com/mssql/77959.html

猜你在找的MsSQL相关文章