Replace alpha bits to null value and convert to number
SELECT REGEXP_REPLACE('%%213213kjkj23213bjk123',
'([[:alpha:]])',
'') RESULT
FROM dual
Replace alpha numeric and Special character to null and convert to number
SELECT REGEXP_REPLACE('%%213213kjkj23213bjk123',
'([[:punct:]^[:alpha:]])',
'') RESULT
FROM dual
ex:
SELECT count(orgn.organization_id), to_number(trim(REGEXP_REPLACE(substr(trim(orgn.NAME), length(trim(orgn.NAME))-3+1),'([[:punct:]^[:alpha:]])',''))) org
FROM apps.hr_all_organization_units orgn
where type= 'FCLT'
group by to_number(trim(REGEXP_REPLACE(substr(trim(orgn.NAME), length(trim(orgn.NAME))-3+1),'([[:punct:]^[:alpha:]])','')))
SELECT REGEXP_REPLACE('%%213213kjkj23213bjk123',
'([[:alpha:]])',
'') RESULT
FROM dual
Replace alpha numeric and Special character to null and convert to number
SELECT REGEXP_REPLACE('%%213213kjkj23213bjk123',
'([[:punct:]^[:alpha:]])',
'') RESULT
FROM dual
ex:
SELECT count(orgn.organization_id), to_number(trim(REGEXP_REPLACE(substr(trim(orgn.NAME), length(trim(orgn.NAME))-3+1),'([[:punct:]^[:alpha:]])',''))) org
FROM apps.hr_all_organization_units orgn
where type= 'FCLT'
group by to_number(trim(REGEXP_REPLACE(substr(trim(orgn.NAME), length(trim(orgn.NAME))-3+1),'([[:punct:]^[:alpha:]])','')))
SELECT REGEXP_REPLACE('@213213kjkj23213bjk123',
ReplyDelete'([0-9])',
'') RESULT
FROM dual;