[英]Getting an error (PLS-00201) when trying to use REGEXP_SUBSTR
I am new at PL SQL and ran into a problem when trying to use REGEXP_SUBSTR in a SQL Procedure. 我是PL SQL的新手,尝试在SQL过程中使用REGEXP_SUBSTR时遇到问题。 I have a String when is a single line from a file and I am trying to isolate one element of that line lik so
我有一个String when是文件中的单行,并且我试图隔离该行的一个元素,因此
"batch_number := REGEXP_SUBSTR(lv_f_line, '[^,]+', 1, 1);"
The error I get is: 我得到的错误是:
"Error(124,25): PLS-00201: identifier 'REGEXP_SUBSTR' must be declared"
Now I undserstand that this is a common error but why on REGEXP_SUBSTR which is not an identifier? 现在我无法理解这是一个常见错误,但是为什么在REGEXP_SUBSTR上却不是标识符呢? I have looked around for an answer and I just cannot find anything.
我到处寻找答案,但找不到任何东西。 Can anyone shed some light please?
有人可以给我一些启示吗?
Many thanks, K. 非常感谢,K。
REGEXP_SUBSTR is an SQL function. REGEXP_SUBSTR是一个SQL函数。 It may not be available in PL/SQL.
它可能在PL / SQL中不可用。
Try something like 尝试类似
SELECT REGEXP_SUBSTR(lv_f_line, '[^,]+', 1, 1)
into batch_number
from dual;
That's not too efficiecnt because of context switching but may work if you don't execute it many times 由于上下文切换的效果不太好,但是如果您不多次执行它可能会起作用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.