What I am trying to accomplish is essentially this:
SELECT 1 FROM DUAL
UNION
EXECUTE IMMEDIATE 'SELECT 2 FROM dual';
I am actually a penetration tester trying to bypass a web application firewall, so I am sure this looks silly/strange from the other side. Basically, I need to be able to do a UNION
with dynamic queries in order to bypass a filter. So, in this example, you are passing a string from Java into an Oracle DB using this function.
I don't have any feedback from the database on what is wrong with my query, and could not find any documentation for someone doing something similar. I need a simple example where I UNION
a normal query with a simple dynamic SQL string.