Skip to main content

using function to_char with region

  • April 11, 2016
  • 4 replies
  • 19 views

heraldo_araujo

hi,

I am with an problem when using an function to_char in my region brazil (pt_BR).
I need using the function to_char for return full name of the month in pt_BR. Following query below.

 

 

select to_char(sysdate,'month') from dual;


But,return only in english.

thanks,

 

4 replies

SruthiA
Forum|alt.badge.img+1
  • Participating Frequently
  • April 11, 2016

Hi,

 

      What is the LANG variable set to?

 

 

Sruthi


heraldo_araujo
  • Author
  • New Participant
  • April 11, 2016

hi,

 

 The settings are therse.

 

$ LANG=en_US.UTF-8

VSQL> LOCALE = 'en_US'

 

thanks


SruthiA
Forum|alt.badge.img+1
  • Participating Frequently
  • April 11, 2016

HI,

 

    Can you try setting server and vsql locale to pt_BR and give a try. Please visit the below URL to know more about setting locales and how output is formatted based on locale set

 

https://my.vertica.com/docs/7.2.x/HTML/index.htm#Authoring/AdministratorsGuide/ConfiguringTheDB/BestPracticesForWorkingWithLocales.htm?Highlight=locale

 

Please make sure that it is encoded in UTF-8

 

 

Sruthi


heraldo_araujo
  • Author
  • New Participant
  • April 11, 2016

hi,

 

 I tried set 'LOCALE' as pt_BR, but not had success on test.