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!

check special characters in a string

927274Jun 6 2012 — edited Jun 6 2012
Hi all
I am using oracle 10g.......
Need to know what should be the query to check whether a special character exists or not in a column value....used the following query like.....

select count(*) into emp_no_count_special_char
from dual
where REGEXP_LIKE(insert_data_rec.emp_no , '[#!$^&*%./\|]$' )
or REGEXP_LIKE(insert_data_rec.emp_no , '^[#!$^&*%./\|]' );

This works fine in case a string starts or ends with a special character ,what if a string of special characters lies in between numeric digits.
e.g: '100#$%7'

Please help find a query that checks for the existence of sp. characters irrespective of their position in the column!!!

Thanks
Dave

Edited by: Dave on Jun 6, 2012 5:17 AM

Edited by: Dave on Jun 6, 2012 5:18 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2012
Added on Jun 6 2012
3 comments
21,900 views