
16/03/2012, 13:53
|
| | Fecha de Ingreso: abril-2004
Mensajes: 107
Antigüedad: 20 años, 10 meses Puntos: 0 | |
Respuesta: ¿Cómo suistuir "null" por otro valor en un select? Eso no me funciona, me sale este error:
"ISNULL": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error en la línea: 7, columna: 44
Por ejemplo, lo hago así y me da error:
SELECT E.codedi, nombre, ISNULL(total_exclu, 0) AS total_exclu, total_repor
FROM EDITORIAL E FULL JOIN
(SELECT codedi, SUM(precio) AS total_exclu
FROM EXCLUSIVA
GROUP BY codedi) T1
ON E.codedi = T1.codedi
FULL JOIN
(SELECT codedi, SUM(precio) AS total_repor
FROM VENTAREPOR V JOIN REPORTAJE R
ON V.codrep = R.codrep
GROUP BY codedi) T2
ON E.codedi = T2.codedi; También he probado a ponerlo aquí:
SELECT E.codedi, nombre, total_exclu, total_repor
FROM EDITORIAL E FULL JOIN
(SELECT codedi, ISNULL(SUM(precio), 0) AS total_exclu
FROM EXCLUSIVA
GROUP BY codedi) T1
ON E.codedi = T1.codedi
FULL JOIN
(SELECT codedi, SUM(precio) AS total_repor
FROM VENTAREPOR V JOIN REPORTAJE R
ON V.codrep = R.codrep
GROUP BY codedi) T2
ON E.codedi = T2.codedi; |