Checks if string is numeric
function is_number(p_str in varchar2)
return boolean
deterministic
Name | Description |
---|---|
p_str |
String to validate |
return | True of p_str is number |
begin
dbms_output.put_line(oos_util_string.to_char(oos_util_validation.is_number('123')));
dbms_output.put_line(oos_util_string.to_char(oos_util_validation.is_number('abc')));
end;
/
TRUE
FALSE
Checks if string is a valid date
function is_date(
p_str in varchar2,
p_date_format in varchar2)
return boolean
deterministic
Name | Description |
---|---|
p_str |
|
p_date_format |
|
return | True if date is valid |
begin
dbms_output.put_line(oos_util_string.to_char(
oos_util_validation.is_date('01-JAN-2015', 'DD-MON-YYYY')));
dbms_output.put_line(oos_util_string.to_char(
oos_util_validation.is_date('not-a-date', 'DD-MON-YYYY')));
end;
/
TRUE
FALSE