Closed GoogleCodeExporter closed 8 years ago
Se crea el listado con la siguiente consulta:
insert into consultasclientes values (0,"PERSONAL ACTIVO NO ASIGNADO PARA LA
FECHA","Devuelve el personal activo no asignado en ningun escalafon de ningun
servicio para la fecha dada. No se incluyen funcionarios con algun Evento en el
Historial durante la fecha dada.","select @rownum:=@rownum+1 AS
Nro,emp.NroEmpleado, emp.Nombre, emp.Apellido from (SELECT @rownum:=0) r,
empleados emp, TiposCargos tc where emp.Activo=1 and emp.IdCargo = tc.IdCargo
and tc.TipoFacturacion='JORNALERO' and emp.NroEmpleado not in (select
distinct(NroEmpleado) from horarioescalafon he where lower(he.dia) =
DAYNAME('FECHA') and he.NroEmpleado not in (select distinct(IdEmpleado) from
eventoshistorialempleado ehe where 'FECHA' between ehe.FechaInicio and
ehe.FechaFin and ehe.borrado=0)) order by emp.NroEmpleado",1)
El problema es que al usar la funciona DAYNAME, se depende de la variable
lc_time_names de mysql. Esta se setea globalmente o en la session, pero hay que
ver como asignarla desde el lado del programa, a traves del connectionString o
desde C#.
Original comment by juanga...@gmail.com
on 5 Feb 2011 at 4:28
Se soluciona seteando la variable lc_time_name="es_UY" en el archivo de
configuracion del Motor MySQL.
Se probo el resto de las funcionalidades de la aplicacion con esta variable
cambiada y no hay ningun impacto.
1) configurar variable
lc_time_names="es_UY" en archivo C:\Archivos de programa\MySQL\MySQL Server
5.1\my.ini
2) Cambio un poquito la Query. Query final
select @rownum:=@rownum+1 AS Nro,emp.NroEmpleado, emp.Nombre, emp.Apellido
from (SELECT @rownum:=0) r, empleados emp, TiposCargos tc where emp.Activo=1
and emp.IdCargo = tc.IdCargo and tc.TipoFacturacion='JORNALERO' and
emp.NroEmpleado not in (select distinct(NroEmpleado) from horarioescalafon he
where lower(he.dia) = DAYNAME('FECHA')) and emp.NroEmpleado not in (select
distinct(IdEmpleado) from eventoshistorialempleado ehe where 'FECHA' between
ehe.FechaInicio and ehe.FechaFin and ehe.borrado=0) order by emp.NroEmpleado
Original comment by juanga...@gmail.com
on 6 Feb 2011 at 3:30
30 minutos insumidos en este listado.
Original comment by juanga...@gmail.com
on 6 Feb 2011 at 3:34
Original comment by juanga...@gmail.com
on 10 Feb 2011 at 2:49
Original comment by juanga...@gmail.com
on 2 Apr 2011 at 11:19
Original comment by juanga...@gmail.com
on 21 Apr 2011 at 4:17
Original issue reported on code.google.com by
juanga...@gmail.com
on 5 Feb 2011 at 12:16