Discussion:
Alter session in a package
(too old to reply)
was
2003-11-18 16:01:49 UTC
Permalink
Hi All,

I would like to know how can i make an alter session (for the date
format) in a PL/Sql function .

Thanks for your help.
Jan Korecki
2003-11-18 16:26:57 UTC
Permalink
Hello!

It's easy from oracle version 8.1.7 and onwards:
"execeute immediate"


example:

execute immediate('ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD
HH24:MI:SS''; ');




Regards,
Janne!
Post by was
Hi All,
I would like to know how can i make an alter session (for the date
format) in a PL/Sql function .
Thanks for your help.
Rene Nyffenegger
2003-11-18 16:47:53 UTC
Permalink
Post by was
I would like to know how can i make an alter session (for the date
format) in a PL/Sql function .
create or replace package util as
procedure common_date;
end;
/

create or replace package body util as
procedure common_date is
begin
execute immediate
'alter session set nls_date_format = ''dd/mon/yyyy''';
end common_date;
end util;
/


exec util.common_date

hth
Rene
--
Rene Nyffenegger
http://www.adp-gmbh.ch
Continue reading on narkive:
Loading...