我正在尝试对SQL Server中的短代码进行批量更新,但是它不返回任何更改:
SELECT DISTCINT
a.site_area_sc, a.site_area_n, a.site_area_rmk, d.site_n 'NAME', d.site_sc,
UPDATE DB.DBO.bg
SET bg_sc = 'XXX-' + bg.bg_sc
FROM DB.DBO.bg
INNER JOIN DB.DBO.site ON s.site_id = bg.site_id
WHERE site.site_sc like 'XXX-%'
AND bg.stat_flag = 'n'
AND s.stat_flag = 'n'
AND bg.bg_sc not like 'XXX-%'
我需要帮助。