Ayuda de relación de tablas
Publicado: 2016-03-28 14:45 @656
Me pasa algo insólito, no puedo creer que esto me esté pasando. Estoy ejecutando una consulta con tablas relacionadas y me trae 0 registros cuando sí existen columnas que cumplan con la condición creada:
db_reuniones=# select cr.nom_reunion,tr.f_prog,tr.f_real,tr.zona,tr.especialidad from t_reuniones tr, c_reuniones cr where tr.homoclave=cr.homoclave order by f_prog;
TABLA t_reuniones:
TABLA c_reuniones:
Me podrán auxiliar por favor con el error que tengo porque no lo veo, mil gracias.
db_reuniones=# select cr.nom_reunion,tr.f_prog,tr.f_real,tr.zona,tr.especialidad from t_reuniones tr, c_reuniones cr where tr.homoclave=cr.homoclave order by f_prog;
Using text Syntax Highlighting
nom_reunion | f_prog | f_real | zona | especialidad
-------------+--------+--------+------+--------------
(0 rows)
-------------+--------+--------+------+--------------
(0 rows)
Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
TABLA t_reuniones:
Using text Syntax Highlighting
id_reunion | homoclave | f_prog | f_real | condicion | gerencia | zona | especialidad
------------+------------+---------------------+---------------------+-----------+----------+-------+--------------
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | P | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | R | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | AP | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | AR | GRTOR | TZ | vacio
------------+------------+---------------------+---------------------+-----------+----------+-------+--------------
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | P | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | R | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | AP | GRTOR | TZ | vacio
1 | RCR | 2016-03-03 08:00:00 | 2016-03-03 16:00:00 | AR | GRTOR | TZ | vacio
Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
TABLA c_reuniones:
Using text Syntax Highlighting
db_reuniones=# select * from c_reuniones;
homoclave | nom_reunion | anio
-----------+-------------------------------------------------+------
HB | HONORES A LA BANDERA | 2016
HV | HORARIO DE VERANO | 2016
DF | DIA FESTIVO | 2016
GRIACR | REUNIONES GRIACR | 2016
DD | DIAS DE DESCANSO | 2016
ITLIN | INSPECCIONES TECNICAS DE LINEAS | 2016
RCR | REVISION CENTROS DE REPARACION | 2016
homoclave | nom_reunion | anio
-----------+-------------------------------------------------+------
HB | HONORES A LA BANDERA | 2016
HV | HORARIO DE VERANO | 2016
DF | DIA FESTIVO | 2016
GRIACR | REUNIONES GRIACR | 2016
DD | DIAS DE DESCANSO | 2016
ITLIN | INSPECCIONES TECNICAS DE LINEAS | 2016
RCR | REVISION CENTROS DE REPARACION | 2016
Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
Me podrán auxiliar por favor con el error que tengo porque no lo veo, mil gracias.