Advertisement
jcarlosriverae

ajuste gretan

Sep 30th, 2021
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. -- ====== LISTA DE MOVIMIENTOS SIMPLIFICADA ======
  2. select
  3. tac.id_cuenta_ahorro,
  4. -- tac.id_cuenta_ahorro_medio_pago,
  5. tac.fecha_alta
  6. , tac.id_transaccion,
  7. tac.valor_real,
  8. tac.monto,
  9. tac.concepto
  10. , tac.clave_rastreo
  11. -- ,tac.concepto_otro
  12. ,tac.tipo_movimiento
  13. -- , tac.id_cuenta_ahorro_medio_pago
  14. , case tac.tipo_movimiento
  15. when 30 then 'Abono'
  16. when 31 then 'Cargo'
  17. when 34 then 'Comisión'
  18. end as tipo_movimiento
  19. from alquimia_vitae.transacciones_ahorro_cliente tac
  20. where
  21. -- tac.id_producto_ahorro = 4 and -- cuentas persona moral
  22. -- id_cuenta_ahorro = 3560
  23. id_cuenta_ahorro in (3560,3938,3939,3786, 3888, 3768, 3786, 3769, 3770, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3867, 3795, 3796, 3794, 3797, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3826, 3827, 3828, 3829, 3831, 3832, 3774, 3830, 3833, 3834, 3835, 3836, 3837, 3775, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3778, 3845, 3777, 3776) -- IN (2084,2085,2086,2087,2094,2096,2103,2104,2108) -- = 1802 and -- not in ( 1459, 1461, 1531, 1532, 1533, 1534, 1553, 1554, 1555, 1593, 1738, 1739, 1740, 1741, 1742, 1743) -- 1662 -- in (1587,1586,1495,1494,1493,1492,1491,1490,1489,1488,1487,1486) -- MARYEL
  24. -- id_cuenta_ahorro = 3202 -- BETWEEN 2712 and 3070 -- cuentas PF viernes 6 agosto
  25. -- and tac.clave_rastreo like "%AQPAY000202108140021532149466"
  26. -- tac.id_transaccion in (36140 )
  27. and concepto like "%spei-in%"
  28. and tac.tipo_movimiento = 34
  29. and tac.fecha_alta >= '2021-08-01' and tac.fecha_alta <= '2021-10-01'
  30. and tac.monto <> 0 and monto <> 0.01 -- and concepto like "%comisi%spei%"
  31. -- and tipo_movimiento = 34 -- abono
  32. order by
  33. -- id_cuenta_ahorro,
  34. -- id_transaccion desc
  35. fecha_alta asc -- , clave_rastreo asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement