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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Regexp_like with check constraint

user533671May 13 2013 — edited May 14 2013
Hi all,

My requirement is User should not enter the data like ( ½, ¼,...).
I have created table with check constraint with the following syntax:


CREATE TABLE mytest (c1 VARCHAR2(20),
CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));

The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.

Please help me, any mistake in the above syntax.

Thanks
Mano
This post has been answered by Solomon Yakobson on May 13 2013
Jump to Answer

Comments

unknown-951199

Identify a database that contains the desired package, then export only this package so  you can subsequently import where needed.

Richard Harrison .

Hi,

Well the source of this package would seem to be

dbmsnacl.sql and prvtnacl.plb

These create the package spec and body - whether they can be installed in isolation from XDB i've no idea - you can try i guess......

so as sys run

@?/rdbms/admin/dbmsnacl.sql

@?/rdbms/admin/prvtnacl.plb

I guess you can always just drop the package if it doesn't work....

Cheers,

Rich

Pravin Takpire

Try this

sql> connect / as sysdba

sql> @?/rdbms/admin/catnacl.sql

sql> @?/rdbms/admin/dbmsnacl.sql

sql> @?/rdbms/admin/prvtnacl.plb

regards

Pravin

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 11 2013
Added on May 13 2013
6 comments
7,473 views