
03/05/2010, 00:51
|
Colaborador | | Fecha de Ingreso: marzo-2008 Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 17 años Puntos: 300 | |
Respuesta: Consulta funciona deficientemente Si es varchar, tienes que usar las comillas.
(SELECT 'trabajadores', id, nombres, apellidos, rut, telefono, cargo, NULL fecha, NULL hora, NULL observaciones FROM trabajadores WHERE rut = 'variable')
UNION ALL
(SELECT 'prot_emergencia', id, nombres, apellidos, rut, NULL, NULL, fecha, hora, observaciones FROM prot_emergencia WHERE rut = 'variable') |