尝试在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;
任何人都可以帮助我。