8/30 sql脚本
SELECT * FROM content_organization_top
update content_organization_top set uuid = UUID() where id =id
update content_organization_top set uuid = REPLACE(uuid,'-','')
UPDATE content_organization_top t, content_organization_department d set d.source_uuid = t.uuid where d.source = t.departName
update lbb_content_organzation_top_extension t, lbb_content_organzation_discipline_extension d set d.source_uuid = t.uuid where d.source = t.depart_name
SELECT * FROM lbb_content_organzation_top_extension where discipline_inspection != ''
update lbb_department_and_employee de, lbb_content_organzation_department_extension d, lbb_content_organzation_employee_extension e set de. where d.source = t.depart_name
select a.uuid,b.uuid from lbb_content_organzation_employee_extension a,lbb_content_organzation_department_extension b where a.department=b.depart_name and a.source = b.source
SELECT count() FROM lbb_department_and_employee
SELECT count() FROM lbb_content_organzation_employee_extension
select a.uuid,b.uuid from lbb_content_organzation_employee_extension a,lbb_content_organzation_top_extension b where a.source = b.depart_name
SELECT * from lbb_content_organzation_employee_extension a where uuid not in (SELECT employee_uuid FROM lbb_department_and_employee de)
SELECT source,uuid from lbb_content_organzation_employee_extension a where uuid not in (SELECT employee_uuid FROM lbb_department_and_employee de)
SELECT depart_name,uuid from lbb_content_organzation_top_extension a where depart_name in (SELECT source from lbb_content_organzation_employee_extension a where uuid not in (SELECT employee_uuid FROM lbb_department_and_employee de))
select a.uuid,b.uuid from lbb_content_organzation_employee_extension a,lbb_content_organzation_top_extension b where a.source = b.depart_name
select a.uuid,b.uuid from lbb_content_organzation_employee_extension a,lbb_content_organzation_department_extension b where a.department=b.depart_name and a.source = b.source