I would like to be able to validate that a piece of code is correct using only PL/SQL.
For example, I have the following code in a variable, I would like to validate it:
my_code:='BEGIN
package1.get_wordlist_keywords_PG;
package1.get_wordlist_keyword_cat_PG;
END;
'
I would like to do something like:
result:=validate_code(my_code);
and result would be "valid" or "invalid" (or with error message etc.)
I am sure this would be possible, as Oracle Apex allows users to enter PL/SQL and runs a validation on the code when it is saved.
I am on Oracle 12c.
Thanks!
P.S. - I do not need to validate a simple sql select, it needs to be a PL/SQL code block.