Forum Discussion

fgimenes's avatar
fgimenes
Occasional Contributor
3 years ago

Not able to call an Oracle Procedure and perform a SQL statement right after

I need to interact with a table which is under a Oracle VPD policy(Virtual Private Database), so I need to run a Procedure first, which runs fine from JDBC Test Step. I am calling like:

{call dbms_application_info.set_client_info('SYSTEM_DDL')}

 

But I need to run a SQL Statement right after this:


SELECT count (1) FROM CLIENTSERVICESSCHEMA.Account

 

So the whole code is:

 

{call dbms_application_info.set_client_info('SYSTEM_DDL')}

SELECT count (1) FROM CLIENTSERVICESSCHEMA.Account

 

 

I am getting the following error:

 

2022-09-09 12:35:32.156 - Error getting response; java.sql.SQLException: ORA-06550: line 3, column 1:
PLS-00103: Encountered the symbol "SELECT" 
ORA-06550: line 5, column 0:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   . , @ ; for <an identifier>
   <a double-quoted delimited-identifier> group having intersect
   minus order partition start subpartition union where connect
   sample

 

Having the call to the procedure in one test step and then the Select statement in another test step does not work. 

 

I've tried so many things, I ran out of ideas. Does anyone have any idea how to do this?
Thank you!

No RepliesBe the first to reply