This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://mega.nz/#!kR0mhYzC!0Bn_ZDZX56ZH12zYas7R3sDvprVB0lXCrukJhMuZBaM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUedaron pendiente 500 m-05 | |
Teléfono: + 56 9 68360950 | |
Pag. 20 | |
https://www.youtube.com/watch?v=DoKRiFN_tnk | |
https://www.youtube.com/watch?v=ryeZ98Nosq0 | |
Nirvana - Smells Like Teen Spirit | |
Moloko - Sing It Back | |
Ace Of Base - All That She Wants | |
Ace of Base - The Sign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select id_sapu, xrut, dv, min(xfecha) from | |
(select s.id_sapu, cast(rtrim(ltrim(s.rut_paciente)) as decimal) as xrut, | |
'dv', date_format(s.lblfechahoraingreso, '%Y-%m-%d') as xfecha | |
from historia_sapu as s | |
where | |
(hour(s.lblfechahoraingreso) >= 8 and hour(s.lblfechahoraingreso) <= 17) | |
and weekday(s.lblfechahoraingreso) not in (1,7) | |
and (s.lblfechahoraingreso between '2015-10-01' and '2016-03-31') | |
and s.rut_paciente not like '%-%' | |
and s.rut_paciente < 43000000 and s.rut_paciente <> 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select l.licencia, u.nombres, u.apellidop, u.apellidom, n.nombre_completo | |
from rrhh_licencia as l | |
inner join rrhh_usuario as u on u.id = l.usuario_id | |
left join rrhh_orden_trabajo as ot on ot.usuario_id = l.usuario_id | |
left join unisag_nodo as n on n.id = ot.nodo_id | |
where now() between inicio_at and termino_at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM USP_USUARIO_APS WHERE YEAR(FECHA_DE_NACIMIENTO) < 1900 OR YEAR(FECHA_DE_NACIMIENTO) > YEAR(GETDATE()) | |
OR NOD_ID NOT IN (225,226,227,2957,3003); | |
SELECT | |
(char(34)+u.RUT+char(34)) AS RUT, | |
(char(34)+u.NOMBRES+char(34)) AS NOMBRES, | |
(char(34)+u.APELLIDO_PATERNO+char(34)) AS APELLIDO_PATERNO, | |
(char(34)+u.APELLIDO_MATERNO+char(34)) AS APELLIDO_MATERNO, | |
char(34)+CONVERT(VARCHAR(10),u.FECHA_DE_NACIMIENTO,20)+char(34) AS FECHA_NACIMIENTO, | |
sexo = CASE u.HL7_0001_U_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select nodo, xrut, xdv, ID_PREVISION, min(xfecha) from | |
(select 2016 as nodo, cast(rtrim(ltrim(a.xrut)) as decimal) as xrut, a.xdv, date_format(a.xfecha, '%Y-%m-%d') as xfecha, a.ID_PREVISION | |
from atenciones as a | |
inner join sapu as s on s.id = a.id_sapu | |
where (hour(a.xfecha) >= 8 and hour(a.xfecha) <= 17) and | |
weekday(a.xfecha) not in (1,7) | |
and a.xrut < 43000000 and a.xdv <> "" and a.xrut <> 0 and CONVERT(a.xrut, SIGNED INTEGER) IS NOT NULL) as Z | |
group by xrut, nodo, xdv, ID_PREVISION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select e.nodo, LPAD(CONCAT(e.run, e.dv), 10, '0') run, e.fecha_inscripcion, CONCAT('G', e.fonasa) fonasa | |
from 2015_1 as e | |
left join 2015_2_E_R as r on e.run = r.run | |
where r.run is null and e.motivo_rechazo is null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update t | |
set t.licencia = p.licencia | |
from temporal_licencias_historicas as t | |
inner join rrhh_licencia_pago as p | |
on (t.rut = p.usuario_id) and (t.inicio = p.inicio_at) and (t.termino = p.termino_at) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM 2015_1 | |
WHERE run IN ( | |
SELECT run | |
FROM `2014_2` | |
WHERE motivo_rechazo = 'F' | |
) AND motivo_rechazo IS null | |
limit 9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- EXPORT DESDE SQL SERVER A MYSQL, PARA TOTEM | |
-- TABLA FAMILIA | |
SELECT ID, SEC_ID FROM IquiqueCom.dbo.FAM_FAMILIA; | |
-- TABLA SECTOR | |
SELECT ID,NOMBRE FROM IquiqueCom.dbo.SEC_SECTOR; | |
-- TABLA NODO | |
SELECT ID, RAZON_SOCIAL FROM IquiqueCom.dbo.NOD_NODO; |