------ Rodar a Query :



SELECT
Descricao,DescricaoNCM, IdClassProd4,
'UPDATE Estq_cadCLassProd4 SET DescricaoNCM = '''+CAST((SELECT DescricaoNCM FROM Estq_cadClassProd4 tb2 WHERE tb2.Descricao = Estq_cadClassProd4.Descricao AND ISNULL(tb2.DescricaoNCM,'') <> '') as NVARCHAR(999))+''' , AliqEstadual = ' +
CAST((SELECT AliqEstadual FROM Estq_cadClassProd4 tb2 WHERE tb2.Descricao = Estq_cadClassProd4.Descricao AND ISNULL(tb2.DescricaoNCM,'') <> '') as NVARCHAR(999))+ ' , AliqImportacao = ' +
CAST((SELECT AliqImportacao FROM Estq_cadClassProd4 tb2 WHERE tb2.Descricao = Estq_cadClassProd4.Descricao AND ISNULL(tb2.DescricaoNCM,'') <> '') as NVARCHAR(999))+ ' , AliqMunicipal = '+
CAST((SELECT AliqMunicipal FROM Estq_cadClassProd4 tb2 WHERE tb2.Descricao = Estq_cadClassProd4.Descricao AND ISNULL(tb2.DescricaoNCM,'') <> '') as NVARCHAR(999))+ ' , AliqNacional = '+
CAST((SELECT AliqNacional FROM Estq_cadClassProd4 tb2 WHERE tb2.Descricao = Estq_cadClassProd4.Descricao AND ISNULL(tb2.DescricaoNCM,'') <> '') as NVARCHAR(999)) + ' WHERE IdCLassProd4 = '+ CAST( (IdClassProd4) as nvarchar(99)) as [UPDATE]

FROM Estq_cadClassProd4 WHERE ISNULL(DescricaoNCM,'') = ''


--------- Executar os comandos da coluna UPDATE