转诊系统导入脚本
- SELECT * FROM doctor WHERE doctorid>2983
- INSERT INTO doctor
- (createtime,doctorname,doctoridnumber,doctorbirthday,doctorsex,doctornation,doctorhospitalname,
- doctorpwd,doctortel,createusername)
- SELECT NOW(),`姓名`,`身份证号`,`出生年月日`,`性别`,'汉',`所属单位`,'',`电话`,'admin'
- FROM `sheet1`
- WHERE `身份证号` NOT IN (SELECT doctoridnumber FROM doctor)
- UPDATE doctor INNER JOIN hospital
- ON doctor.doctorhospitalname=hospital.hospitalname
- AND doctor.doctorid > 2983
- AND doctor.DoctorHospitalCode IS NULL
- AND hospital.parentcode = '00010019'
- SET doctor.DoctorHospitalCode=hospital.hospitalcode
- UPDATE doctor SET doctorpwd = '670B14728AD9902AECBA32E22FA4F6BD'
- WHERE doctorpwd=''
- #添加权限
- INSERT INTO nch_dts.`doctor_role` (doctorguid,doctorname,doctoridnumber,rolecode,rolename)
- SELECT NULL,doctorname,doctoridnumber,2,'医生'
- FROM doctor
- WHERE doctorid>2983
============ 欢迎各位老板打赏~ ===========
与本文相关的文章
- · mysql创建用户并赋予权限
- · docker定时任务Mysql脚本
- · docker安装mysql8注意事项
- · 定时备份docker中的mysql
- · docker-compose通过容器名连接mysql
- · unity3d mysql error: The given key was not present in the dictionary.
- · mysql服务性能优化—my.cnf配置说明详解(不同内存)
- · MySQL 批量修改数据表编码及字符集
- · Your database must use ‘READ-COMMITTED’ as the default isolation level.
- · MySQL-InnoDB存储引擎
- · 将数据从mysql迁移到clickhouse
- · docker安装Mysql5.7