welyngj(不做老实人)
------------------
但是表的字段: UserNoCompass、cityname、areacode、flag 都是字符串类型的,
那么
   insert into UserNoCompass
    (UserNoCompassid,UserNoCompass,nome,cityname,
      areacode,flag,Usrid,opdate)
    values  
   (UserNoCompassid.nextval,Param1,'ABCD',Param2,
       param2,Param3,1,sysdate);是否正确的呢?就象: select * from user where name = '小赵'
“小赵”必须加引号一样, 那么param1,param2,param3不加引号,系统是否可以识别?

解决方案 »

  1.   

    我的存储过程在执行的过程中报出执行错误:
    ORA-01401 :插入的值对于列过大。
      

  2.   

    出什么错?
       if sql%rowcount =0 
        then RetValue := -1;
       else
         RetValue :=0;
       end if;%ROWCOUNT Attribute: How Many Rows Affected So Far?  %ROWCOUNT yields the number of rows affected by an INSERT, UPDATE, or DELETE
    statement, or returned by a SELECT INTO statement. %ROWCOUNT yields 0 if an
    INSERT, UPDATE, or DELETE statement affected no rows, or a SELECT INTO
    statement returned no rows. In the following example, you use %ROWCOUNT to take
    action if more than ten rows have been deleted:DELETE FROM emp WHERE ...
    IF SQL%ROWCOUNT > 10 THEN -- more than 10 rows were deleted
    ...
    END IF;If a SELECT INTO statement returns more than one row, PL/SQL raises the
    predefined exception TOO_MANY_ROWS and %ROWCOUNT yields 1, not the actual
    number of rows that satisfy the query.
      

  3.   

    我的存储过程在执行的过程中报出执行错误:
    ORA-01401 :插入的值对于列过大。这是什么错误?
      

  4.   

    假设Param1的值为'aa',长度为2,而列UserNoCompass的长度为1,它放不下Param1的内容,所以报错
      

  5.   

    你用
    SQL>DESC 表名
    看看你的各字段的定义的长度是多少,看看你插入的数据有没有超出长度的.