I need the following query to return a message, such as "No Result" if the Record Count = 0.
set @ID_CARTERA = 1;
select
LEFT(A.F_ANOTRIMESTRE, 4 ) Year,
RIGHT(A.F_ANOTRIMESTRE, 2 ) Quarter,
ROUND ( A.POR_RENTABILIDAD, 2 ) Quarterly_Yield
from dr_rent_carteras_trimestres A
where A.ID_CARTERA = @ID_CARTERA
And (LEFT(A.F_ANOTRIMESTRE, 4 ) = ( select MAX(left(F_ANOTRIMESTRE, 4 ) ) - 0
from dr_rent_carteras_trimestres
where ID_CARTERA = @ID_CARTERA )
and
RIGHT(A.F_ANOTRIMESTRE, 2 ) = 12)