Condicionantes con valores null
Información
El dolor de cabeza de todo programador o administrador de bases de datos, son los datos donde el resultado puede ser null, esto algunas veces o casi siempre provoca estragos. Es mejor saber darles un tratamiento para evitar problemas
Para descargar (Incluye base de datos y ejemplos en un archivo de texto):
https://drive.google.com/file/d/1WDA9sOW_yqX7WaIEr0Mn23R5FiZwkTIS/view?usp=sharing
Video
Fuente del video
Fuente del video
2021-03-01 19:45:35 pm webmaster
-- 0008 NULL SELECT * from servidor_publico p -- Alfanumerico where p.cargo='ENLACE' select P.CARGO, P.NOMBRE || '' || P.APELLIDO_P || ' ' || P.APELLIDO_M NOMBRE_COMPLETO from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' select P.CARGO, P.NOMBRE || '' || coalesce(P.APELLIDO_P, '') || ' ' || coalesce(P.APELLIDO_M, '') NOMBRE_COMPLETO from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' select P.NOMBRE || '' || coalesce(P.APELLIDO_P, ' ') || ' ' || coalesce(P.APELLIDO_M, ' ') NOMBRE_COMPLETO, P.SUELDO from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' select P.NOMBRE || '' || coalesce(P.APELLIDO_P, ' ') || ' ' || coalesce(P.APELLIDO_M, ' ') NOMBRE_COMPLETO, P.SUELDO from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' and p.sueldo is null -- Numerico select P.NOMBRE || '' || coalesce(P.APELLIDO_P, ' ') || ' ' || coalesce(P.APELLIDO_M, ' ') NOMBRE_COMPLETO, coalesce( P.SUELDO,0), coalesce( P.SUELDO+1 * 15,0) QUINCENA from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' select P.NOMBRE || '' || coalesce(P.APELLIDO_P, ' ') || ' ' || coalesce(P.APELLIDO_M, ' ') NOMBRE_COMPLETO, coalesce( P.SUELDO,0), (coalesce(P.SUELDO,0)+1) * 15 QUINCENA from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE' select P.NOMBRE || '' || coalesce(P.APELLIDO_P, ' ') || ' ' || coalesce(P.APELLIDO_M, ' ') NOMBRE_COMPLETO, coalesce( P.SUELDO,0), coalesce(P.SUELDO,0) * 15 QUINCENA from SERVIDOR_PUBLICO P where P.CARGO = 'ENLACE'