select * from mid_city   --贫困县及省表

select code,censusaddr from bd_psndoc --人员表户籍地址字段

sqlserver模糊查找贫困县sqlserver模糊查找贫困县

 

declare
  --v_count int(4);
  v_sql varchar2(1000);
  begin
     for c_cur in(
       select replace(country,'') c_country from mid_city where length(country) >2
       union all
       select country from mid_city where length(country) <=2
       )
       loop 
        v_sql := 'update bd_psndoc set is_flag=''Y'' where censusaddr like ''%'||c_cur.c_country||'%''';
        dbms_output.put_line(v_sql);
        execute immediate v_sql;
        --commit;
       end loop;

       update bd_psndoc set is_flag='N' where is_flag is null;
       commit;
       end;

 sqlserver模糊查找贫困县

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-10-05
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
猜你喜欢
  • 2021-12-08
  • 2022-01-02
  • 2022-12-23
  • 2021-06-04
  • 2022-02-10
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案