尝试在 SQL Server 中执行以下查询时出现错误 SQL 错误:executeQuery 方法必须返回结果集。
with cte
AS
(
SELECT GUID,seq original_seq_no, ROW_NUMBER()
OVER ( PARTITION BY GUID ORDER BY seq) AS new_seq_no
FROM CHK_SEQ
)
update CHK_SEQ
set CHK_SEQ.seq = r.new_seq_no
from cte r
where CHK_SEQ.seq = r.original_seq_no AND CHK_SEQ.GUID= r.GUID;
任何人都可以帮我解决这个问题。