The answer to your question is:
where newTable.sat_name = SingleAuthor.sat_name
It will reference the outer table, because the one in the subquery is out of scope. If this were a problem, though, you could give the one in the subquery a different alias.
I think you can write the query more efficiently as:
with toupdate as (
select sa.*, dense_rank() over (order by sat_name) as newVal
from SingleAuthor sa
)
update toupdate
set sat_RowNumber = newval
The dense_rank()
function does exactly what you are doing with row_number()
on the aggregated values.