leolzi

1.导入别的表

 

insert into EMPI_IDENTIFY select id,empiid, name||\':\' ||idcardno,\'accidcardno\',\'\' from empi_main where empi_state =\'正常\';

insert into EMPI_IDENTIFY
 select sys_guid(),empiid, name||\':\' ||tel,\'acctel\',\'\' from empi_main where empi_state =\'正常\' and tel is not null;

 

2.

 delete
    FROM empi_cross  where id in(
     
     SELECT id from (
         SELECT ROW_NUMBER()
                 OVER(PARTITION BY t.linkempiid ORDER BY t.linkempiid) rn,       
          t.*       
          FROM empi_cross t
          )       
             WHERE rn = 2
    )

 

 

 

分类:

技术点:

相关文章:

  • 2021-11-19
  • 2021-11-29
  • 2021-09-14
  • 2021-09-29
  • 2021-08-26
  • 2021-11-29
  • 2021-12-24
猜你喜欢
  • 2021-10-20
  • 2021-09-28
  • 2021-11-29
  • 2021-05-30
  • 2021-09-06
  • 2021-11-29
相关资源
相似解决方案