Advertisement
nhorquender

La query que deberia ser

Jan 18th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. SELECT cuenta, vencida ,enCurso as val, IFNULL(lc.razon_social, 'S/I') as cliente
  2. FROM tbl_resumen_informe_gestion
  3. LEFT JOIN (select distinct(t.deudor), t.razon_social from tbl_linea_credito t WHERE t.area = 'C101' or t.area = 'C103') lc
  4. ON tbl_resumen_informe_gestion.cuenta = lc.deudor
  5. WHERE (vencida <> 0 or enCurso<>0) AND mes=9 AND año=2018
  6. and clave=1207 and ejecutivo='Milva Ortiz' order by cuenta
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement