由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 请教:PL/SQL
相关主题
请教PL/SQL 语法如何安装Oracle内置包
oracle dbms_outputOraEdit 求助!
如何用SQL语句判断一个TABLE是否存在?PL/SQL 输入DATA
请教:trigger 里得不到blob值是怎么回事儿?一道题 PL/SQL
请教: SQL SUMETL/SSRS Intermediate Developer电面
oracle pl sql recursive functionMS T-SQL 问题
mysql: how to format output?请帮忙读懂这个sql script
想report SQL Server 2008的一个不足之处--output more than 1 million rows into EXCEL初级问题
相关话题的讨论汇总
话题: put话题: vprice话题: number话题: dbms
进入Database版参与讨论
1 (共1页)
P********R
发帖数: 1691
1
下面这个哪儿不对
DECLARE
vPartid NUMBER (4);
vDescription VARCHAR2 (265);
vPrice NUMBER (7, 2);
BEGIN
SELECT Partid, Description, Price
INTO vPartid, vDescription, vPrice
FROM INVENTORY
WHERE Price = (SELECT MAX (price) FROM INVENTORY);
   DBMS_OUTPUT.PUT_LINE ('Part Number ' || vPartid ||
'described as ' || vDescription ||
'is the hightest priced item in inventroy at ' ||
TO_CHAR(vPrice,'$9999.99')  );
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('OTHERS EXCEPTION');
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
PLS-00103: Encountered the symbol " " when expecting one of the
following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with

<< close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
r***r
发帖数: 123
2
exception
when no_data_found then
do sth here;
and
put / under "end;"
P********R
发帖数: 1691
3
谢谢!

【在 r***r 的大作中提到】
: exception
: when no_data_found then
: do sth here;
: and
: put / under "end;"

1 (共1页)
进入Database版参与讨论
相关主题
初级问题请教: SQL SUM
SQL question HELPoracle pl sql recursive function
Another onemysql: how to format output?
求救!!! 一个oracle的问题! 在procedure中所涉及的表名可以用变量从参数中传入吗想report SQL Server 2008的一个不足之处--output more than 1 million rows into EXCEL
请教PL/SQL 语法如何安装Oracle内置包
oracle dbms_outputOraEdit 求助!
如何用SQL语句判断一个TABLE是否存在?PL/SQL 输入DATA
请教:trigger 里得不到blob值是怎么回事儿?一道题 PL/SQL
相关话题的讨论汇总
话题: put话题: vprice话题: number话题: dbms