regexp_like [:digit:]{10}
hemant_kMar 17 2009 — edited Mar 18 2009hi
i have to columns in a table of type varchar2
having names as tel1 and tel2
both columns contains mobile no or other land line phones no.
occassionaly user inputs alphabets also
in India we have ten digit format for cellno starting with 9
i am trying to select only mobile no from col1 and col2 using regexp_like expresssion
as follows
SELECT LBRCODE,PRDACCTID,
*(case when regexp_like (tel1,'^[[:digit:]{10}then*
tel1
when
*regexp_like (tel2,'^[[:digit:]{10}THEN*
TEL2
else
*'NOT A CELLNO'*
END
*)*
FROM addresses
WHERE PRDACCTID IN (SELECT PRDACCTID FROM ac_mast
WHERE ACCTSTAT<>3 AND PRDACCTID LIKE 'SB%')
what is wrong that i am doing here?
please help