Prueba asi:
Código SQL:
Ver originalSELECT
CASE mes
WHEN 12 THEN 'Diciembre'
WHEN 1 THEN 'Enero'
WHEN 2 THEN 'Febrero'
END AS mes,
SUM(prima_us_PC) AS prima_us_PC, SUM(prima_us_BU) AS prima_us_BU
FROM (
SELECT mes, SUM(prima_us) AS prima_us_PC, SUM(0) AS prima_us_BU
FROM produ_comercial
WHERE manager = 'L' AND cia ='000169'
AND ((mes = 12 AND YEAR IN (2008,2009)) OR (mes IN (1,2) AND YEAR IN (2009,2010)))
GROUP BY mes
UNION
SELECT mes, SUM(0) AS prima_us_PC, SUM(prima_us) AS prima_us_BU
FROM tbl_budget
AND ((mes = 12 AND YEAR IN (2008,2009)) OR (mes IN (1,2) AND YEAR IN (2009,2010)))
GROUP BY mes
) a
GROUP BY mes