Podrias separar las subconsultas:
Código SQL:
Ver originalSELECT * FROM(
SELECT
c.crenumero
, c.crefechgeneinte
, isnull(pp3.Ti_UltCuoVen, 0) AS Ti_UltCuoVen
, CASE isnull(pp3.Ti_UltCuoVen, 0) WHEN 0 THEN c.crefechgeneinte ELSE pp3.Sdt_FecUltCuoVen END AS Sdt_FecUltCuoVen
, dia.D_IntCorCS
FROM
dbo.vistintecorr AS c
LEFT OUTER JOIN (
SELECT
ppcuota AS Ti_UltCuoVen
, ppfecha AS Sdt_FecUltCuoVen
, crenumero
FROM
dbo.planpago
WHERE
ppfecha <= @Sdt_FecPag
AND ppcuota = (
SELECT MAX(ppcuota) FROM planpago AS ppn
WHERE ppn.crenumero = dbo.planpago.crenumero
AND ppfecha <= @Sdt_FecPag
)
) AS pp3 ON pp3.crenumero = c.crenumero
) AS completa
LEFT OUTER JOIN (
SELECT SUM(diavalointe - diaabonsubs) AS D_IntCorCS, crenumero
FROM dbo.diario
WHERE diaestado = 'CS'
AND diafecha < (SELECT CASE isnull(Ti_UltCuoVen, 0) WHEN 0 THEN completa.crefechgeneinte ELSE pp.ppfecha END AS ppfecha
FROM planpago AS pp
WHERE pp.crenumero=dbo.diario.crenumero AND
pp.ppfecha <= @Sdt_FecPag
AND pp.ppcuota = (
SELECT MAX(pp2.ppcuota) FROM planpago AS pp2
WHERE completa.crenumero = dbo.diario.crenumero
AND completa.ppfecha <= @Sdt_FecPag
))
GROUP BY crenumero
) AS dia ON dia.crenumero = completa.crenumero