这是我的一个函数
create or replace function fretbfidlist(p_bfidmin in varchar2,p_bfidmax in varchar2) return varchar2 is
  v_bfidlist varchar2(20000);
  v_cbya varchar2(10) ;
  v_cbyb varchar2(10) ;
  v_cbra varchar2(10) ;
  v_cbrb varchar2(10) ;
  v_bfida varchar2(20000) ;
  v_bfidb varchar2(20000) ;
begin
  v_cbya = substr(p_bfidmin,1,3  ) ;
  v_cbyb = substr(p_bfidmax,1,3  ) ;
  v_cbra = substr(p_bfidmin,4,2  ) ;
  v_cbrb = substr(p_bfidmax,4,2  ) ;
select * from bookframe_1 where substr(bfid,1,3)>=v_cbya and substr(bfid,1,3)<=v_cbra and
substr(bfid,4,2)>=v_cbra and  substr(bfid,4,2)<=v_cbrb ;  return  v_bfidlist ;
end fgetbcode;
编译的时候出现一下提示,不知道怎末回事Compilation errors for FUNCTION APPUSER.FRETBFIDLISTError: PLS-00103: 出现符号 "="在需要下列之一时:
        := . ( @ % ;
Line: 10
Text: v_cbya = substr(p_bfidmin,1,3  ) ;Error: PLS-00103: 出现符号 "V_CBYB"
Line: 11
Text: v_cbyb = substr(p_bfidmax,1,3  ) ;Error: PLS-00103: 出现符号 ";"在需要下列之一时:
        . ( * % & - + / at mod
          remainder rem return returning <an exponent (**)> and or ||
          multiset
       符号 "(在 ";" 继续之前已插入。
Line: 11
Text: v_cbyb = substr(p_bfidmax,1,3  ) ;Error: PLS-00103: 出现符号 ";"在需要下列之一时:
        . ( ) , * % & - + / at mod
          remainder rem <an exponent (**)> and or using || multiset
       符号 "(在 ";" 继续之前已插入。
Line: 12
Text: v_cbra = substr(p_bfidmin,4,2  ) ;Error: PLS-00103: 出现符号 ";"在需要下列之一时:
        . ( ) , * % & - + / at mod
          remainder rem <an exponent (**)> and or using || multiset
Line: 13
Text: v_cbrb = substr(p_bfidmax,4,2  ) ;Error: PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
        end not pragma
          final instantiable order overriding static member constructor
          map
Line: 19
刚涉足数据库编程
等高人求解

解决方案 »

  1.   

    1 Error: PLS-00103 Oracle 中是用 := 賦值的
    請先把 = 換成 := 再看看!
      

  2.   

    格式错了
    select *** into **** from ***** where
      

  3.   

    v_cbya := substr(p_bfidmin,1,3  ) ;
      v_cbyb := substr(p_bfidmax,1,3  ) ;
      v_cbra := substr(p_bfidmin,4,2  ) ;
      v_cbrb := substr(p_bfidmax,4,2  ) ;
    select * into * from *
      

  4.   

    除了赋值,补充一点。
    最后一句:
    end fgetbcode;
    这个‘fgetbcode’凭空冒出来了
      

  5.   

    这个end 后面的那个东西这样写是没有错的,我看了教程上是这样搞的。
    把=换成:=还是提示那样的错误。
      

  6.   

    你的赋值方式不对  oracle 中赋值应该是:
            :=
      还不是:
           =
      前者为赋值运算符号,后者为关系等.
      

  7.   

    修改:
      '还不是'--->>改为--->>'而不是'  不好意思...
      

  8.   

    其次错误2:
       你在结束处--即函数的end后面跟的应该是函数名,你写得不一致!