一。
update port1 aa
   set aa.列 = (select nmsno
                        from (select distinct portid, nmsno
                                from view_aa bb
                               where 条件) cc
                       where aa.id = cc.portid)
where  aa.id=2050604
二。
对于view_aa视图中,含有如下CASE when语句:
       case when substr(c.no,1,1)='0' and length(c.no)>1
       then
           case when f_is_num(c.no)='1' then to_char(to_number(c.no))
           else substr(c.no,2)
           end
       else c.no end subneno_dzero 
其中f_is_num是个自定义函数,就是判断当前列的类型是否为数据,1为数字。
三。
只要该视图中case when 其中含有自定义函数,运行“一”中的update语句,就会提示:"ora-02069":此操作的global_names设为"true",我后台将alter system set global_names =true;改以后,另提示出错是"ora-02019:未找到远程数据库等" (但若case when语句中去掉f_is_num自定义函数,则一切正常。) <<附:f_is_num函数:
     CREATE OR REPLACE FUNCTION F_IS_NUM(P_NUM IN VARCHAR2) RETURN VARCHAR2 AS
    V_TMP NUMBER;   BEGIN
  IF P_NUM IS NULL THEN
     RETURN NULL;
  END IF;  V_TMP := TO_NUMBER(P_NUM);
  RETURN '1';  EXCEPTION
     WHEN OTHERS THEN
     RETURN '0';   END;
  <<请问:该如何解决该问题,非常感谢。另(oracle版本我已升级成9.2.0.6.0)