SELECT 'UPDATE Clt_cadCliente SET Codigo='''+RIGHT('0000' + CAST(ROW_NUMBER() OVER(ORDER BY IdCliente DESC) AS VARCHAR), 4) +'''

 WHERE IdCliente='''+ convert(nvarchar(50) , IdCliente)+''''

 FROM Clt_cadCliente