我们有两个表dbo.MONITOR
(Reg. table)和sum_file_folder
(documentum table)
dbo.MONITOR
- FILE_ID
- STATUS
sum_file_folder
- object_name
- file_status
其中,FILE_ID 和 object_name 是两个表中的相同字段。
所以这些内部连接查询不起作用......
update dbo.MONITOR t1 objects set t1.STATUS = (select file_status from sum_file_folder t2 where t1.FILE_ID=t2.object_name)
UPDATE t1 OBJECTS SET t1.STATUS = t2.file_status from sum_file_folder t1 INNER JOIN dbo.MONITOR t2 ON t1.object_name = t2.FILE_ID