【发布时间】:2014-12-10 12:21:08
【问题描述】:
我无法使用简单的 SELECT 语句来初始化变量。
DECLARE
A VARCHAR2(10);
BEGIN
A := (SELECT FIRST_NAME FROM FIMS_OWNER.EMPLOYEE_T WHERE WWID = 'NA734');
END;
/
错误:
[Error] Execution (4: 11): ORA-06550: line 4, column 11:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternat
ORA-06550: line 4, column 76:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
* & - + ; / at for mod remainder rem <an exponent (**)> and
or group having intersect minus order start union where
connect || multiset
如果不可能,有什么替代方法。
PS:我正在使用这样的查询来设置变量(并稍后使用它),我的光标动态获取WWID,然后相应地更改值。
【问题讨论】:
标签: database oracle plsql toad