Use regexp_like in machine step?

Hi! Is it possible to use regexp_like in a machine step? Or do I need to use some type of package for it?

DECLARE

cell_no_ varchar2(25) := :cellNumber;

BEGIN

IF REGEXP_LIKE(cell_no_, ‘^((46)?|0)7[02369][ -]?([0-9][ -]*){6}[0-9]$’) THEN

);
END IF;

END;

I believe that is an Oracle function, so you are using the Oracle connector?

I have not tried that specific oracle function myself but sometimes the parser is unaware of the function, but it still works at runtime. There is no package or similar to update the parser.

Are you executing it as a script (database call type)?
I know people sometimes create a temporary stored procedure for a bit more advanced queries, this is for MS SQL server but it is similar in Oracle:

Another option (perhaps) would be to use flow script in a previous step to manipulate your data?

Hi Ola! Yes, I’m using the Oracle Connector and it doesn’t work.
I’m not sure about the package yet, I need to figure that out.

And you are sure that cell_no_ gets your :cellNumber correctly?

Do you have access to SQL Developer? What happens when you run the function by itself? But, it might be better to not use a “Script” like your doing and instead use it in a query when you initially query the data.

Also, depending on what your program is trying to accomplish (exactly as @OlaCarlander mentioned), it might just be easier to have a Novacura script step before your Oracle Script step that separates your initial query into two tables: one that matches the regex and all the others that do not.