Skip to Main Content

Oracle Database Discussions

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!

Using regexp_like in sql query

malhiJun 27 2012 — edited Jun 28 2012
In one of our table, we have a column named claim_no, in this column various types of claim numbers exists. I want to point such claim numbers with wrong format. The criteria of correct claim number is,
if pension_code = 2,3,5,6,7,8 then claim_no should be like AAA99999 (first three alpha and five numeric)
if pension_code = 1 then claim_no should be like AA 99999 (first two alpha, one space and five numeric)
if pension_code = 4 then claim_no should be like BBB99999 or BB999999 (first three blanks and five numeric, first two blanks and six numeric)

Any claim_no that does not fulfill above criteria is wrong, we need to know these.

I could not develop such query, you requested to please help me.

Edited by: malhi on Jun 27, 2012 3:20 AM

Edited by: malhi on Jun 27, 2012 10:34 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2012
Added on Jun 27 2012
5 comments
203 views