declare @UC as nvarchar (max)
declare @UV as nvarchar (max)

set @UV = Isnull((select top 1 ValorUnitario from tblProdVendido 
where CodigoProduto = '214' and Situacao = 'Finalizado' order by DataHoraAtualizacao desc),0)


set @UC = Isnull((select  top 1 ValorCusto from tblEntradaEstoque where CodigoProduto = '214' order by DataHoraAtualizacao desc),0)

select @UV as UV, @UC as UC