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!

A way to specify 2 delimiters INSTR function?

DIBS812Jun 25 2012 — edited Jun 25 2012
Does anyone know if there's another function or a way to specify 2 delimiters INSTR function?


select distinct substr(summary ,1, (INSTR(summary,':',1,1)-1)) as "Dep Error Summary",count(*)
from AAA.BKS_AAA_DEP_ERRORS
where creation_date > to_date('06/21/12 22:28','mm/dd/yy HH24:MI')
group by summary
UNION
select distinct substr(summary ,1, (INSTR(summary,'.',1,1)-1)) as "Dep Error Summary",count(*)
from AAA.BKS_AAA_DEP_ERRORS
where creation_date > to_date('06/21/12 22:28','mm/dd/yy HH24:MI')
group by summary


I’m using a union to return the results on the same row BUT I’m getting extra rows.


Results
Validation Failure 1
Rebilling Failure 468
Derive Party ID Failure 468
Derivation Failure 1
1
468


Any recommendations on how I may eliminate these extra rows?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2012
Added on Jun 25 2012
6 comments
539 views