Código SQL:
Ver originalSELECT C.Id,
CONVERT(VARCHAR(10),CONVERT(DATE,P.Create_Date,106),103) Create_Date,
------------------------------
FROM Customer C
LEFT JOIN
--- Incluyo la Tasa de Cambio---------------------------------------------------------------------------------------------------
( SELECT
E.sell_rate, campo que haga referencia con customer
FROM CURRENCY_EXCHANGE E
WHERE
CONVERT(VARCHAR(10),CONVERT(DATE,P.Create_Date,106),103) =
CASE
WHEN CONVERT(VARCHAR(10),CONVERT(DATE,E.effective_date,106),103) = CONVERT(VARCHAR(10),CONVERT(DATE,P.Create_Date,106),103)
THEN CONVERT(VARCHAR(10),CONVERT(DATE,E.effective_date,106),103)
ELSE
CONVERT(VARCHAR(10),CONVERT(DATE,P.Create_Date,106),103)
END AS campo
) AS Tasa ON (tasa.campoid=c.id)
---------------------------------------------------------------------------------------------------
, Cash_Receipt P, cash_receipt_line Det, Receivable R
WHERE
C.ID = P.CUSTOMER_ID AND
P.Check_id = Det. Check_Id AND
P.Customer_Id = Det.Customer_Id AND
R.Invoice_Id = Det.Invoice_Id AND
P.STATUS = 'A'
GROUP BY C.Id, P.Create_Date
Mis disculpas prueba con eso, y revisa los nombres de los campos, date cuenta que estoy haciendo los joins por campos ID, y no se si esos campos existan o no