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 Z.*,
		          regexp_substr(Z.CLEANED,'[9][0-9]{8}') telefono
		   FROM(
           SELECT RUC_PROV, TELEF_CONTACTO, 
		          CASE WHEN TELEF_CONTACTO LIKE '' THEN TELEF_CONTACTO
				       ELSE REGEXP_REPLACE(STRTOK(STRTOK(TELEF_CONTACTO,'*',1), '/', 1), '[-+#(),* a-zA-Z]', '') END CLEANED
		   FROM E_DW_VIEWS.V_MST_VPC_BASES_ECOSIS_BC 
		   WHERE RUC_PROV IN ('RPC 997 681 215','20527597651','20110353538','20510037562','20602067158', '20513646608', '20533294970', '20101293387', '20537900891', '20600612922', '20507141791', '20492916472')
		   AND TELEF_CONTACTO  NOT LIKE '' 
           ) Z

 

Revise this Paste

Your Name: Code Language: