...
Verificamos varias veces que todos los datos estén correctos y ya podemos probar el script en el ambiente de prueba() si no tenemos ningun ningún error durante la ejecucion ejecución entonces se encuentra todo correcto para ejecutar en ambiente de produccion.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
insert into promociones_id select distinct 990001517 id_promocion, --***************************** rpad(('PR01517 '||a.emisor||' 20%'),15) proceso, --***************************** PR0000X se agrega para evitar duplicaciones el 0000X debe ser correlativo cambiar numero de id y por dto 0 flg_x_tx, 1 flg_x_cta, 1 flg_x_promo, min(a.fec_vig_desde) fec_vig_desde, max(a.fec_vig_hasta) fec_vig_hasta, a.monto_desde, a.monto_tope, a.porc_dto, 0, --al agregar cero se toma la parametrizacion hecha por operaciones a.rubro, 1 activo, sysdate fec_upd, user operador from creditopy.comercios_promocion a where a.emisor = 52 --***************************** and a.id_promocion in (select distinct id_promocion from creditopy.comercios_promocion a where a.emisor = 52 --***************************** and a.fec_vig_desde between to_date('20/09/2022','dd/mm/yyyy') --***************************** and to_date('20/12/2022','dd/mm/yyyy') --***************************** and a.comercio in (768457) --***************************** and a.porc_dto = 20 --***************************** and a.id_promocion < 990000000) group by a.emisor_procesador, a.emisor, a.ramo, a.monto_desde, a.monto_tope, a.porc_dto, a.rubro ; update comercios_promocion a set a.id_promocion = 990001517 --***************************** where a.emisor = 52 --***************************** and a.id_promocion in (select distinct id_promocion from creditopy.comercios_promocion a where a.emisor = 52 --***************************** and a.fec_vig_desde between to_date('20/09/2022','dd/mm/yyyy') --***************************** and to_date('20/12/2022','dd/mm/yyyy') --***************************** and a.comercio in (768457) --***************************** and a.porc_dto = 20 --***************************** and a.id_promocion < 990000000); commit; |
3ER PASO
Para ejecutar este script (previamente modificado con los datos correspondientes a la nueva promoción a agregar y probarlo en el ambiente test BAPY_TEST) en ambiente de producción debemos pasarle a un compañero o persona encargada del departamento de IT que pueda ejecutarlo en la BD BAPY_PROD.