编译的为什么会包错create or replace procedure sp_rawdata_ls_temp_1 is
cursor c_1 is
SELECT 
(SELECT desc_loc FROM ts_code1 c WHERE c.class = 'W16' AND c.code = x.operator ) as operator_name
FROM ts_rpt_obu_view x
;
begin
null;
end sp_rawdata_ls_temp_1;
ts_rpt_obu_view 是一个视图,这段sql直接执行就没有问题。PROCEDURE SVC.SP_RAWDATA_LS_TEMP_1 编译错误错误:PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
行:4
文本:(SELECT desc_loc FROM ts_code1 c WHERE c.class = 'W16' AND c.code = x.operator ) as operator_name错误:提示: Cursor 'c_1' 已被声明但从来没有被用于 'sp_rawdata_ls_temp_1'
行:2
文本:cursor c_1 is