querys validar portabilidad postpago

SELECT * FROM PORTT_SOLICITUDES_PORTA A WHERE A.SOPOC_TIPO_DOCUMENTO='01' AND A.SOPOV_NUM_DOCUMENTO='44785528' AND A.SOPOC_INICIO_RANGO='942139083';


---obtener los IDS
SELECT A.SOLIN_CODIGO AS SEC, A.SOLIV_NUM_CON AS CONTRATO, B.ID_DOCUMENTO, C.NRO_DOCUMENTO PEDIDO
  FROM SECT_SOLICITUD A
  INNER JOIN SISACT_AP_VENTA B    ON A.SOLIN_CODIGO = B.NUMERO_SEC
  INNER JOIN SISACT_INFO_VENTA_SAP C    ON B.ID_DOCUMENTO = C.ID_VENTA   AND C.TIPO_DOCUMENTO = 'F'
WHERE A.SOLIN_CODIGO IN (45315190)--> Una SEC de SISACT y otra de APK
ORDER BY 1;

-----------------------------------BUSCA POR SEC-----------------------------------------
SELECT * FROM SECT_SOLICITUD WHERE SOLIN_CODIGO in (42565332) ORDER BY SOLIN_CODIGO;  --> se inserta al registrar la sec
SELECT * FROM SISACT_SOLICITUD_PLAN WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; --> se inserta al registrar la sec
SELECT * FROM SISACT_SOLICITUD_GARANTIA WHERE SOLIN_CODIGO in ( 42565332) ORDER BY SOLIN_CODIGO; --> se inserta al registrar la sec
SELECT * FROM SISACT_SOLICITUD_PLAN_VENTA WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO;
SELECT * FROM SECT_CLIENTE WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; --> se inserta al registrar la sec
SELECT * FROM SECT_DATOS_CREDITOS WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; --> se inserta al registrar la sec
SELECT * FROM SECT_HISTORICO WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; --> se inserta al registrar la sec
SELECT * FROM SISACT_HISTORICO_ESTADO WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO;
SELECT * FROM SISACT_AP_SOLIC_PLAN_SERV WHERE SOLIN_CODIGO in (42565332) ORDER BY SOLIN_CODIGO;
SELECT * FROM SISACT_SOLICITUD_SERV_ACT WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO;
SELECT * FROM SISACT_AP_SOLICITUD_PRODUCTO WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; ----> se inserta al registrar la venta
SELECT * FROM SISACT_INPUT_OUTPUT_BRMS WHERE SOLIN_CODIGO IN (42565332 ) ORDER BY SOLIN_CODIGO; ----> se inserta al registrar la venta
SELECT * FROM SISACT_SOLICITUD_PORTABILIDAD WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; ----> se inserta al registrar la venta
SELECT * FROM SISACT_SOLI_DECLA_PORTA WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; ----> se inserta al registrar la
SELECT * FROM SISACT_SEC_DATOS WHERE SOLIN_CODIGO in (42565332 ) ORDER BY SOLIN_CODIGO; ----> se inserta al registrar la sec
SELECT * FROM BIOMT_GENDOC_28574 WHERE GDOC_NROSEC IN (42565332 ) ORDER BY GDOC_NROSEC;  ---tiene q tener datos prepago y postpago, venta
SELECT * FROM SISAT_BRMS_BIOMOVIL  --> ----> se inserta al registrar la sec


-----------------------------------BUSCA POR CONTRATO----------------------------------------- ----> se inserta al registrar la venta
select * from sisact_ap_contrato avc where avc.contn_numero_contrato in (14378595);
select * from sisact_ap_contrato_det acd where acd.id_contrato in (14378595);
select * from sisact_contrato_activacion where id_contrato in (14378595);
select * from sisact_ap_contrato_serv where id_contrato in (14378595);
select * from sisact_contrato_equipo where id_contrato in (14378595);
select * from sisact_contrato_estado_hist where id_contrato in (14378595);
select * from sisact_pago_cuotas a where a.cuov_nro_contrato in (14378595);   --- si es cuota tiene q tener datos

-----------------------------------BUSCA POR PEDIDO----------------------------------------- ----> se inserta al registrar la venta
select * from mssap60.SSAPT_PEDIDO@dbl_mssap60 where pedin_nropedido in (48407030);
select * from mssap60.SSAPT_INTENCIONPAGO@dbl_mssap60 where pedin_nropedido in (48407030);
select * from mssap60.SSAPT_DETALLEPEDIDO@dbl_mssap60 where pedin_nropedido in (48407030);
select * from mssap60.SSAPT_DESCUENTOPRODUCTO@dbl_mssap60 where pedin_nropedido in (48407030);
select * from sisact_cve a where a.cvev_documento_sap in (48407030); --- si es cuota tiene q tener datos

-----------------------------------BUSCA POR ID_DOCUMENTO----------------------------------------- ----> se inserta al registrar la venta
select * from sisact_ap_venta av where av.id_documento in (17239762) ORDER BY id_documento;    ---tiene q tener datos
select * from sisact_ap_venta_detalle avd where avd.id_documento in (17239762) ORDER BY id_documento;   ---tiene q tener datos
select * from sisact_info_venta_sap where id_venta in (17239762) ORDER BY id_venta;

login:
73123125

select * from biom_gendoc_28574 a where
--a.gdoc_linea= '916654865'
a.gdoc_nrodocumento='46603312' and a.godc_nropedido='52668394';

select * from sisact_trans_biomovil_28574 b where bmov_num_documento= '46603312' and bmov_id_transaccion = '01901919191191919';

//





Comentarios