我应该如何验证前四位数作为一个字符,最后三位数字作为oracle表单中字段容器号的数字

时间:2016-06-18 15:18:04

标签: oracleforms

如何通过oracle表格验证前四位数作为字符,最后三位数作为容器编号字段中的数字

我试过以下

begin if container_number is null then error message; else for i in 1..length(:xxms_xp_shippingout_line.container_number) v_length:=substr(:xxms_xp_shippingout_line.container_number,i,4); v_length1:=substr(:xxms_xp_shippingout_line.container_number,i,5); loop if v_length is not between 'A' and 'Z' then error message; if v_length1 is not between '0' and '9' error message; end if; end if; end if; end;

1 个答案:

答案 0 :(得分:0)

你可以创建一个db函数来为你检查这个正则表达式: 请参阅以下link