PLS-00103 
found 'string' but expected one of the following: 'string'"},
Cause: This error message is from the parser. It found a token (language
element) that is inappropriate in this context.
Action: Check previous tokens as well as the one given in the error message.
The line and column numbers given in the error message refer to the end of the
faulty language construct.

解决方案 »

  1.   

    copy到文本编辑器中发现在if substr(v_rightlist,i,1)='1' then前面有两个奇怪的字符,编译的时候出现了相同的错误,把这两个字符删掉就可以了。
      

  2.   

    没发现oracle有string类型,把它改为varchar2
    另外i不用定义,oracle隐式定义
    function InsertUser(v_username in varchar2,v_pw in varchar2,
                                 v_enable in varchar2, v_dh in varchar2,  v_mobile in varchar2,
                                 v_xl in varchar2, v_address in varchar2,v_jointime in date,v_departno in varchar2,
                                 v_rightlist in varchar2) return varchar2 is
      

  3.   

    beckhambobo说的对,我太粗心了,只copy到编辑器中,看到了不合法字符就误认为是这些字符引起的。抱歉!