I'm receiving the following error messages:
ERROR: Access Violation occurred during PREPARE!
When trying to invoke this method twice:
PROC DS2 ERRORSTOP;
package regexp / overwrite=yes;
method match( varchar(1024) pattern, varchar(1024) string ) returns integer;
return prxmatch(pattern, string);
end;
run;
QUIT;
In this query:
PROC FEDSQL;
DROP TABLE tableA FORCE;
CREATE TABLE tableA (
id VARCHAR(11)
);
INSERT INTO tableA
SELECT id
FROM someDatabase.someSchema.tableZ
WHERE regexp.match('/^[0-9]{11}/', bble_docref_id) = 1
UNION
SELECT id
FROM someDatabase.someSchema.tableY
WHERE regexp.match('/^[0-9]{11}/', bble_docref_id) = 1;
QUIT;
Removing either one of the WHERE statements doesn't throw an error. How can I use the method twice or more without SAS throwing an error?