oraacle

jueves, 3 de octubre de 2013

Problem getting the day of the week varies in america (sunday 1) and spain (sunday 7)

If you have the territory to america,
you get sunday as 1

if you have the territory to spain
you get sunday as 7

To solve this problem you can create a trigger on logon to set the territory.



CREATE OR REPLACE TRIGGER TGR_SET_REGIONAL
 AFTER
 LOGON
 ON DATABASE
BEGIN
 execute immediate 'ALTER SESSION SET NLS_TERRITORY=''AMERICA''';
 END;
/
Publicadas por Unknown a la/s 9:36 a.m. No hay comentarios.:
Enviar esto por correo electrónicoBlogThis!Compartir en XCompartir en FacebookCompartir en Pinterest
Entradas más recientes Página Principal
Suscribirse a: Entradas (Atom)

Archivo del Blog

  • ►  2018 (8)
    • ►  noviembre (3)
    • ►  julio (1)
    • ►  junio (2)
    • ►  mayo (1)
    • ►  marzo (1)
  • ►  2017 (8)
    • ►  diciembre (2)
    • ►  septiembre (1)
    • ►  julio (2)
    • ►  junio (1)
    • ►  mayo (1)
    • ►  marzo (1)
  • ►  2016 (7)
    • ►  agosto (1)
    • ►  mayo (2)
    • ►  abril (2)
    • ►  febrero (1)
    • ►  enero (1)
  • ►  2015 (7)
    • ►  septiembre (1)
    • ►  agosto (1)
    • ►  julio (1)
    • ►  junio (1)
    • ►  mayo (2)
    • ►  enero (1)
  • ►  2014 (2)
    • ►  julio (1)
    • ►  abril (1)
  • ▼  2013 (1)
    • ▼  octubre (1)
      • Problem getting the day of the week varies in amer...

Acerca de mí

Unknown
Ver mi perfil completo
Tema Sencillo. Con tecnología de Blogger.