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!

Restrict entry of invalid characters into a field.

907301Jul 6 2018 — edited Jul 6 2018

Hi,

I would like to know if there is any function/option in oracle to restrict the entry of values in a field only with a combination of numeric and few special characters.

For an instance, in current below are the valid entries. Numeric '1' is used for explanatory purpose. Any number is valid.

<1   >1    <=1    >=1     =1    1.0   1.00

Apart from these any other value entered is invalid. Currently, I tried using REGEXP_LIKE(column, '[^0-9.<=>]'). However, this seems to be allowing multiple entries of the special characters and also allows the comparative operators after the numeric value like 100<= which is invalid. The logical operators should be entered only at the first place. Also should restrict the entry of decimal ( . ) twice.

Can anyone help me?

This post has been answered by mathguy on Jul 6 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2018
Added on Jul 6 2018
3 comments
1,784 views