INSERT INTO 表A(SELECT  B.A FROM 表B)
B.A的值是由另一个字段(B.C)得到, 条件是B.C IS NOT NULL如何实现?

解决方案 »

  1.   

    INSERT INTO 表A(SELECT  B.A FROM 表B where b.c is not null)
      

  2.   

    insert into tbl_mapping_inter_account_hfm
        (Centitycode,
         Caccountcodeapps,
         Caccountcodehfm,
         BISDETAILCFG,
         )
        select v_entitycode,
               t.accapp,
               t.acchfm,           
               decode(t.c2, '[None]',(t.isdetailcfg=0),(t.isdetailcfg=1))     
        from v_noah_input_data t;
      commit;
    end;如何用DECODE语句有问题,请问如何解决
      

  3.   

    INSERT INTO A(SELECT  B.A FROM B where b.c is not null)
    这样就行
    或者是你自己的方法
    insert into tbl_mapping_inter_account_hfm
        (Centitycode,
         Caccountcodeapps,
         Caccountcodehfm,
         BISDETAILCFG,
         )
        select v_entitycode,
               t.accapp,
               t.acchfm,           
               decode(t.c2, '[None]',0,1))     
        from v_noah_input_data t;
      commit;
    end;