Loading... * 如题,避免复制粘贴等各种操作 * 跟HIS同数据库则直接用用户名访问表,没有则建dblink ```sql insert into pacsdepartment (departmentid, hospitalid, departmentcode, departmentname, dept_description, isavailable, operatorid, operatetime, hisdeptid, departmentproperty, departmentarea) select q.DEPT_CODE, decode(q.branch_code,'0042','1','1408','1','5800','2') as hosp, --PACS院区编码 q.SPELL_CODE, q.DEPT_NAME, '' as dept_description, '1' as isavailable, 'super' as operatorid, sysdate as operatetime, q.DEPT_CODE as id2, '0' as dpt, '' as we from his50.COM_DEPARTMENT Q where Q.DEPT_NAME not in (select t.departmentname from pacsdepartment t) and Q.DEPT_code not in (select t.departmentid from pacsdepartment t) and Q.DEPT_TYPE in ('I', 'C') AND Q.DEPT_NAME NOT LIKE '%方舱%'; ``` 最后修改:2024 年 04 月 25 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏