小编典典

PLS-00103:在预期以下情况之一时遇到符号“文件名”:

sql

我正在运行以下脚本-

BEGIN
    select department_name 
    from egpl_department 
    where department_id in (select department_id 
                            from egpl_casemgmt_activity);
END ;

并得到了错误-

PLS-00103: Encountered the symbol "end-of-file" when 
expecting one of the following: 
;

阅读 220

收藏
2021-04-17

共1个答案

小编典典

在PL / SQL块中,select语句应包含一个into子句:

DECLARE
 v_department egpl_department.department_name%type;
BEGIN 
  select department_name 
  into   v_department
  from   egpl_department 
  where  department_id in (select department_id from egpl_casemgmt_activity);

  -- Do something useful with v_department
END;
2021-04-17