Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as SQL by registered user vvillacorta ( 8 months ago )
SELECT PERIODO, NUM_RUC
   FROM (
	   SELECT DISTINCT '202404' PERIODO, NUM_RUC
	   FROM  ODS.MM_GESCOM_UNIVERSO_MERCADO_TOTAL_BPE
	   WHERE LEN(NUM_RUC) = 11
	   UNION
	   SELECT DISTINCT '202404' PERIODO, RUC NUM_RUC
	   FROM TMP_BBC_UNIVERSO_PERUFARMA
	   UNION
	   SELECT DISTINCT '202404' PERIODO, RUC NUM_RUC
	   FROM TMP_BBC_UNIVERSO_QUIMICA_SUIZA
	   UNION
	   SELECT DISTINCT '202404' PERIODO, RUC NUM_RUC
	   FROM ODS.HM_GESCOM_EFACT_VENTAS
	   UNION
	   SELECT DISTINCT '202404' PERIODO, NUM_RUC
	   FROM ODS.HM_EC_VENTAS_IZIPAY
	   UNION
	   SELECT DISTINCT '202404' PERIODO, RUC NUM_RUC
	   FROM TMP_BBC_HUBS_EVALUAR_RIESGOS
   ) AA
   GROUP BY PERIODO, NUM_RUC

 

Revise this Paste

Your Name: Code Language: