1

有人能告诉我为什么下面的函数应该编译失败吗?

CREATE or replace FUNCTION CONCAT_LIST
      (cur IN SYS_REFCURSOR, sep IN VARCHAR2) 
    RETURN  VARCHAR2
IS 
  ret VARCHAR2(32000); 
  tmp VARCHAR2(4000); 
BEGIN 
    --open cur;
    loop 
      fetch cur into tmp; 
      exit when cur%NOTFOUND;
      if ret is null then
       ret := tmp; 
      else 
        ret := ret || sep || tmp; 
      end if;
    end loop; 
    RETURN ret;
  END;

我得到的错误信息是

 PLS-00103: Encountered the symbol " " when expecting one of the following:
 <an identifier> <a double-quoted delimited-identifier> SELF_
 LONG_ double ref char time timestamp interval date binary
 national character nchar
4

0 回答 0