Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Alter Session in PL/SQL code

vecio88Aug 11 2015 — edited Aug 11 2015

hi to all,

i have a problem with Alter Sessione. I have need to set in running phase the NLS_LANGUAGE. How can i do? I trying with a anonimus block but i get this error:

Report errori:

ORA-06550: line 5, column 1:

PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:

   begin case declare exit for goto if loop mod null pragma

   raise return select update while with <un identificativo>

   <un identificativo delimitato da virgolette>

   <una bind variable> << close current delete fetch lock insert

   open rollback savepoint set sql execute commit forall merge

   pipe

The symbol "update was inserted before "ALTER" to continue.

06550. 00000 -  "line %s, column %s:\n%s"

*Cause:    Usually a PL/SQL compilation error.

*Action:

This is the code:

DECLARE

v_prova DATE;

BEGIN

alter session set  NLS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8;

SELECT dt_upd INTO v_prova FROM a_log_test2 WHERE note = 'INIZIO MASTER DATA' and trunc(dt_upd) = '11-08-2015 00:00:00';

dbms_output.put_line(v_prova);

end;

how can i solve?

vecio88

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2015
Added on Aug 11 2015
12 comments
30,036 views