Licenciada

Páginas: 5 (1178 palabras) Publicado: 27 de noviembre de 2012
TEMPUS.. CONSULTAS

select * FROM tempus.personal_lectoras where CODIGO IN ('1',
'2',
'4',
'5',
'6',
)AND idlectora = 2 ;
//PERSONAL ACTIVO QUE MARCAN CON DNI

select * FROM tempus.personal_huella where CODIGO IN ('105',
'151',
'153',
'156',
) AND HUELLA IS NULL;

//PERSONAL QUE MARCA CON DNI Y QUE NO TIENEN REGISTRADO HUELLA

select A.CODIGO, A.APELLIDO_PATERNO,A.APELLIDO_MATERNO, A.NOMBRES, A.DNI, A.OFICINA, B.DESCRIPCION
FROM tempus.personal A
INNER JOIN TEMPUS.OFICINA B ON A.OFICINA = B.OFICINA where A.CODIGO IN ('163',
'175',
'213',
'227',
) ORDER BY A.OFICINA

//USANDO “INNER JOIN “ PERSONAL CON DATOS FIANLES

select fecha,* from tempus.tiempos_calculados
where fecha > '20111018'
and convert(datetime,total) < '06:00'
order by codigo asc,total
//PARA VER LAS HORAS MENORES Y TARDANZAS

--TARDONES PRODUCCION DIA
select a.codigo,b.apellido_paterno, b.apellido_materno,
b.nombres,a.fecha, a.hora_de_inicio,
c.descripcion
from tempus.tiempos_calculados a
inner join tempus.personal b
on a.codigo = b.codigo
inner join tempus.oficina c
on b.oficina = c.oficina
where a.fecha >= '20111026'
and a.fecha <= '20111102'
andconvert(datetime,a.hora_de_inicio) > '07:30'
and convert(datetime,a.hora_de_inicio) < '18:30'
and a.time_in_minutes <> 1438
and b.oficina in ('001','011','012')
order by a.fecha,a.codigo

--TARDONES PRODUCCION NOCHE
select a.codigo,b.apellido_paterno, b.apellido_materno,
b.nombres,a.fecha, a.hora_de_inicio,
c.descripcion
from tempus.tiempos_calculados a
inner jointempus.personal b
on a.codigo = b.codigo
inner join tempus.oficina c
on b.oficina = c.oficina
where a.fecha >= '20111026'
and a.fecha <= '20111102'
and convert(datetime,a.hora_de_inicio) > '19:30'
--and convert(datetime,a.hora_de_inicio) < '07:30'
and a.time_in_minutes <> 1438
and b.oficina in ('002')
order by a.fecha,a.codigo

--VIVOS DE QUE SALEN TEMPRANO
selecta.codigo,b.apellido_paterno, b.apellido_materno,
b.nombres,a.fecha, a.hora_de_fin,
c.descripcion
from tempus.tiempos_calculados a
inner join tempus.personal b
on a.codigo = b.codigo
inner join tempus.oficina c
on b.oficina = c.oficina
where a.fecha >= '20111026'
and a.fecha <= '20111102'
and convert(datetime,a.hora_de_fin) < '19:00'
--and convert(datetime,a.hora_de_inicio) <'07:30'
and a.time_in_minutes <> 1438
and b.oficina in ('001','011','012')
order by a.fecha,a.codigo

--VIVOS DE QUE SALEN TEMPRANO
select a.codigo,b.apellido_paterno, b.apellido_materno,
b.nombres,a.fecha, a.total,
c.descripcion
from tempus.tiempos_calculados a
inner join tempus.personal b
on a.codigo = b.codigo
inner join tempus.oficina c
on b.oficina = c.oficina
where a.fecha>= '20111026'
and a.fecha <= '20111102'
--and convert(datetime,a.hora_de_fin) < '19:00'
and convert(datetime,a.total) < '10:00'
and convert(datetime,a.total) > '01:00'
--and a.time_in_minutes <> 1438
and b.oficina in ('001','002','011','012')
order by a.fecha,a.codigo

select * from tempus.tiempos_calculados
where

select * from tempus.personal
select * fromtempus.oficina
select * from tempus.tiempos_calculados

-------------------------------------------------
--VIVOS QUE TRABAJAN POCO
-------------------------------------------------
select a.fecha,a.codigo,b.apellido_paterno, b.apellido_materno,
-------------------------------------------------
b.nombres, a.hora_de_inicio, a.hora_de_fin, a.total,-------------------------------------------------
c.descripcion
-------------------------------------------------
from tempus.tiempos_calculados a
-------------------------------------------------
inner join tempus.personal b
-------------------------------------------------
on a.codigo = b.codigo
-------------------------------------------------
inner join tempus.oficina c
-------------------------------------------------
on...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Licenciado
  • Licenciado
  • Licenciada
  • Licenciado
  • Licenciada
  • Licenciada
  • Licenciado
  • Licenciado

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS