Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MarioCares/c96eb66f8bd650ea32b0026434bb0d32 to your computer and use it in GitHub Desktop.
Save MarioCares/c96eb66f8bd650ea32b0026434bb0d32 to your computer and use it in GitHub Desktop.
INSERT INTO rrhh_accidente_trabajo
select id, tipo, (CASE WHEN estado = 0 THEN 2 WHEN estado = 1 THEN 1 END) AS estado, usuario, '17432116',
num_resolucion, fecha_ingreso, fecha_accidente, fecha_inicio_reposo, fecha_fin_reposo, '.', null, null
from rrhh_licencia_accidente WHERE usuario != 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment