—更新计量点中不存在的数据,将台帐中的信息转移到计量点中
insert into MetricPoints (MeterID,MetricPointName,[Description],DepartmentID,MediumID)
(SELECT m.MeterID,m.MetricItems+m.InstallPlace as m_MetricPointName,m.MetricItems,m.DepartmentID,m.MediumID
FROM Meters m WHERE NOT EXISTS (SELECT 1 FROM MetricPoints WHERE MetricPoints.MeterID=m.MeterID ) and m.MediumID=2)
© 版权声明
文章版权归作者所有,未经允许请勿转载。