miércoles, 24 de abril de 2019

folios no empleados query

SELECT t1.folio,t2.id_DTE_anulados
  FROM hist_DTE t1 LEFT JOIN dte_anulados t2 ON t1.id_DTE = t2.id_tabla_hist_DTE
  WHERE t1.tipo_DTE=33 AND t1.borrado = 'NO' AND t2.id_DTE_anulados IS NULL
  and t1.folio between 10329 and 10333
  ORDER BY t1.folio ASC

No hay comentarios.:

Publicar un comentario