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!

SQL to test for any combination of three characters

Avi AbramiJun 22 2006 — edited Jun 23 2006
Greetings,
I am using Oracle 10g (10.1.0.4.0) on Linux (Red Hat Enterprise Linux AS release 3). One of our database tables has a VALUE column. Valid values for this column is a string comprising any combination of the letters 'A', 'B', 'C' or 'D' where each letter appears only once, for example: 'CAB' or 'DCB' or 'DB' or 'A' or 'ABCD', etc.
[Note that 'BBD' is not valid because the letter 'B' appears twice.]

I am looking for SQL that will test whether the letter 'D' is not present in the string.

Thanks (in advance),
Avi.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2006
Added on Jun 22 2006
22 comments
1,183 views