3.sql 718 B

123456789101112131415161718
  1. update sys_dept d set tax_code = (
  2. select t.zj_number from wm_da_agent t where d.dept_id = t.dept_id
  3. )
  4. update sys_dept d set tax_code = (
  5. select t.entcode from wm_da_drug_ent t where d.dept_id = t.dept_id
  6. ) where tax_code is null
  7. update sys_user set rlj_cert_status = cert_status where cert_status < 10
  8. insert into sys_dept_sub (dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,enable_flag)
  9. SELECT dept_id,subject_type,app_id,app_secret,rsa_public_key,query_url,subject_name,1 from sys_dept where dept_id<>1 and del_flag=0 and app_id is not null
  10. update wm_score_package_settle_note t set id_card_number = (
  11. select s.id_card_number from sys_user s where t.user_id = s.user_id )