Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> doing two session-setting ops in one SQL submission...
Hi. I have a JDBC client to Oracle, and I want to initialize two
session settings in one SQL string sent to the DBMS. I can do things
like sending two normal updates with a string:
"BEGIN insert into mytable values(...); insert into myOthertable values(...); END;"
I am naively trying:
"BEGIN alter session set nls_date_format = 'MM/DD/YYYY'; set role xxxx_role identified by xxxx; END;".
This fails*. Is there working syntax for what I want to do? Thanks in advance,
Joe Weinstein at BEA