Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

regexp_like [:digit:]{10}

hemant_kMar 17 2009 — edited Mar 18 2009
hi
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2009
Added on Mar 17 2009
10 comments
35,284 views