Cannot get to_char on a date with NLS_LANGUAGE option to work

I'm working on the development of an application that will be multilingual. I need to replace some text in a string with a date in the format DD month yyyy. In order for the month to be displayed in the language of the user, I have to do a to_char using NLS_LANGUAGE option, but I can't seem to make it work. No matter what language I use, I get the output in English.
SQL> select to_char(SYSDATE,'dd Month yyyy','NLS_LANGUAGE=GERMAN') FROM dual;
 
TO_CHAR(SYSDATE,'DDMONTHYYYY',
--------------------------------------------
11 March     2013
 
SQL> select to_char(SYSDATE,'dd Month yyyy','NLS_LANGUAGE=FRENCH') FROM dual;
 
TO_CHAR(SYSDATE,'DDMONTHYYYY',
--------------------------------------------
11 March     2013
 
SQL> select to_char(SYSDATE,'dd Month yyyy','NLS_LANGUAGE=ITALIAN') FROM dual;
 
TO_CHAR(SYSDATE,'DDMONTHYYYY',
--------------------------------------------
11 March     2013
I must have the correct syntax because if I use a language no I get an error.
SQL> select to_char(SYSDATE,'dd Month yyyy','NLS_LANGUAGE=XXX') FROM dual;
 
select to_char(SYSDATE,'dd Month yyyy','NLS_LANGUAGE=XXX') FROM dual
 
ORA-12702: invalid NLS parameter string used in SQL function
How to make this work properly?

Hello

You must specify NLS_DATE_LANGUAGE.

WITH     target_languages     AS
(
     SELECT     'German' AS language     FROM dual  UNION ALL
     SELECT     'French'          FROM dual  UNION ALL
     SELECT     'Italian'          FROM dual
)
SELECT     language
,     TO_CHAR ( SYSDATE
          , 'FMDD Month YYYY'
          , 'NLS_DATE_LANGUAGE=' || language
          )      AS t_c
FROM    target_languages
;

Output:

LANGUAG T_C
------- --------------------
German  11 März 2013
French  11 Mars 2013
Italian 11 Marzo 2013

Published by: Frank Kulash, 11 March 2013 16:28

Tags: Database

Similar Questions

  • NEED HELP WITH SERVICE PACK 3. After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. ,

    NEED HELP WITH SERVICE PACK 3.  After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. , but it of although he gets, he keeps countdown to restart and reboots and restarts, over and over again, never reboots, same screen. my computer won't let me out this screen even after I turned off the computer and turn it back on, I get the same screen. the only way I can get out of this is to erase my computer everything and bring it back to factory, right out of the box, this big headaches. Thanks for anyone who can help me. PS. Keep the answers in simple terms please.

    Hi BSRC$, in stock

    1. You have security software installed on the computer?
    2. You receive an error message when you restart the computer?

    Reinstalling Windows XP to the factory setting would not be the first option.

    It is possible that some third-party programs or the services installed on the computer interfere with the installation of service pack 3.

    I suggest that you try to uninstall service pack 3 from the computer by using the recovery console and subsequently ask the article below for what to do before installing the service pack 3on the computer.

    How to remove Windows XP Service Pack 3 from your computer

    http://support.Microsoft.com/kb/950249

    Steps to take before you install Windows XP Service Pack 3

    http://support.Microsoft.com/kb/950717

  • 1059 Error - cannot get 11 channels of data written in the spreadsheet file

    Hello everyone

    Again, it's Luke. I got the 7 fixed error, missing just a specific filepath to save data too.

    I now hit another snag along the way. When I enter data into a spreadsheet box writing, an error comes up saying "error 1059: unexpected file type".

    Anyone have any idea why its doing this?

    The only things that I put in the function box is some specific data on 2 GPS units I use, with a tension from my DAQ and the installation of strain gauges. Information works on my front and information is coming through, but will not save the data in a spreadsheet file, and writes a .lvm file will not work either.

    I will surround a printscreen of the configuration for the block diagram:

    Ohm Man wrote:

    I'm not sure of the exact file extension

    How do you define it?

    You set under whatever file name you put in your control filepath.

    I don't think it makes sense to get an error that says for attempting to write to a text file.

    Any chance you try to write the file to a path that you have not the full access rights to?  I think the error may be 1059, but it's actually be caused by a file windows error.  How about some strange characters in the name of the control that are not valid in Windows file?

  • Cannot get my workablle video capture with my windows7 system device.

    Since I upgraded my system to windows7, I couldn't use my video capture device.

    Hello

    That can happen because you don't have the Windows 7 drivers for it.

    What is your video capture device (brand, model)?

    Have you passed to the manufacturer website and downloaded the appropriate drivers for windows 7?

    Carlos

  • How to add FK in data with the option off maker

    Hello

    I'm designing a new scheme where I have to create the new tables with FK. I want to create the FK with option off, I see no possibility to do so in the Data Modeler. I can see the option to not generate, but it will not create the FK with option off.

    Can anyone help please?

    Thank you
    Vishal Gupta

    For every person who says 'I can manage the integrity of data loading data', there is a person who cannot.

    I worked in large single database systems, we had 1.25PB (Yes petabytes) of the disk and I've never seen an improvement in the performance of the deactivation of the constraints that have made a difference worth having.

    On the other hand I was paid a lot of money to clean up the mess after the fact, when the promise of the integrity of the data by code failed to materialize.

  • cannot use the wheel to scroll with Google Calendar. Works with IE, so not a problem of Google.

    The wheel on my mouse does not work with Google Calendar. It works everywhere else. It also works with Google calendar on IE. That's why I think it's a Firefox issue.


  • I can't get on my email exchange with firefox, and it worked until today.

    My company uses an exchange of owa.postoffice.net , and that we are supposed to use internet explore or firefox. I have a Mac, so I use firefox and it works fine for the last 90 days, and today, I go to the Exchange, type my user name and password, and I am then sent just a blank page. I talked to two other Mac user today within my company and he's not having any problems at all, so that tells me it's my firefox who is having these problems. I would like someone to call me about it @ 919-669-4909. I don't want to talk by email.

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Firefox > Preferences > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox > Preferences > privacy > Cookies: "show the Cookies".
  • Tecra M3: Cannot get the SD memory and utility boot Format to work

    Format SD memory Boot utility does not! (Tecra M3)
    SD memory boot utility and install utility Format Software memory SD fine with no problems. But they both then return an error when you try to start a program.

    Utility boot SD says:
    Unexpected error! 00-52-FF02-126 error code

    SD format utility says:
    Unexpected error! Error code = 0x0034FF02

    After clicking on this message box appears the window of the program, but there is no drive to select. There is an SD card into the SD card reader slot, but still he does not come to the top.

    I run Windows XP pro, office 2003 against Tecra M3.

    Help, please! Do you know of any other (free) software to use the brand so a bootable SD card, or how to fix these errors.

    Hello

    Sorry, but your ad confuses me completely. If you did clean using the delivered OS install why you should install ConfigFree recovery media tool?
    TOSHIBA ConfigFree tool V5.00.48 is undoubtedly part of the recovery image and if you use recovery image you should NOT install anything. On this way unit is completely configured.

    The recovery image contains the operating system, all necessary drivers and Toshiba designed tools and utilities. After the installation procedure and first departure all the pieces of equipment work harmonic if there is no any kind of hardware malfunction.

    Only thing you need to do is to install own application you need for work (office or any what editing application) or games for fun with Notepad.

    If you have another question please write again.

    Good bye

  • cannot get rid of message, another download of adobe app works. I deleted all the downloads of adobe and always get the messagde.

    I installed Adobe Elements, a few weeks ago and after reading the reviews found that the lightroom may be a better fit. I uninstalled the trial of elements. I can't download the trial for lightroom. I get a message that bed is something as impossible to download another Adobe app download. Then, I deleted everything about downloading as I had started several before you go into the downloads folder. How can I download the free trial version of lightroom? Bill

    Have you tried to download link below?

    Download Photoshop Lightroom

  • Cannot get digital channels will appear on kdl-40xbr7 it worked last week.

    Since my grandchildren where here last week my TV KDL-40XBR7 only list digital channels. When you perform the initial installation, it finds all analog channels digital channel search starts it concludes digital a few then scanning stops at step 4 of 7 and shows the analog channels, but no. I tried everything even to put tv back to factory settings and install still no digital channels. Does anyone have an idea what could be wrong thank you.

    discovered step son plugged a device bundles and it corrupted digital firmware. I downloaded the firmware and loaded on the TV and everything works fine now.

  • I keep getting messages "Flash obsolete. Firefox Plugin Check says it is up-to-date with the version 11.2.202.418 but the current version is *. 425 cannot be installed.

    I use Ubuntu 14.

    These last days (say, a week) I get messages saying that the Flash is obsolete, and firefox blocks the plugin, so I have to unlock ('allow') every time that I get to a new page. It's no big deal, but it's boring and, for example, I can't watch movies on my page of favorite movie...
    In the firefox Plugin Check page, I get a message 'to day', but it shows the version 11.2.202.418, which is also the version of Ubuntu Software Center and current version is 11.2.202.425. I tried this https://support.mozilla.org/en-US/kb/keep-flash-up-to-date-and-troubleshoot-problems#w_updating-flash for a manual installation instructions, but cannot get to the place where firefox is installed.

    I already moved chrome Firefox because of repeated malfuntioning of chrome, I have nowhere to go! (pity me).

    Thanks to you all! And sorry for the spelling mistakes / syntactic possibilities, English is not my first language.

    I think Unbuntu would have an update now that 11.2.202.425 has been out of Adobe since December 9 as 11.2.202.424 and is more vulnerable.

    Find the .mozilla folder at / and create a folder called plugins , so you can place the libflashplayer.so file here.

    Now, all installations of Firefox and SeaMonkey will be able to use it.

    Flash 11.2.202.425 tarball is to
    https://www.Adobe.com/products/flashplayer/distribution3.html

    https://helpx.Adobe.com/security/products/Flash-Player/apsb14-27.html

  • Get the date with the millisecond of the table

    I want to get the date with milliseconds in table format in the variable. How to get there?

    SQL > create table test_date (col1 date);

    Table created
    SQL > insert into test_date values (sysdate);

    1 row inserted

    SQL > commit;

    Validation complete

    SQL > select * from test_date;

    COL1
    -----------
    18/12/2009


    Here I have to get datewith "millisecond" format and put it into the variable varchar2 (50) and pass this
    to Java.


    SQL > select to_char (COL1, ' mm/dd/yyyy hh24:mi:ss. FF') of test_date;

    Select to_char (COL1, ' mm/dd/yyyy hh24:mi:ss. FF') of test_date

    ORA-01821: date format not recognized

    SQL >

    Thank you
    Khaldi

    user601042 wrote:
    I want to get the date with milliseconds in table format in the variable. How to get there?

    SQL > create table test_date (col1 date);

    Your data col1 type should be TIMESTAMP.

    See you soon
    Sarma.

  • Cannot get new url of the tab open with the homepage (Google).

    After the upgrade, I cannot get rid of 12 boxes (Facebook, Youtube, etc.) on the new tab or make open with my homepage (Google). I tried two different newtaburl add-on, uninstall and reinstall Firefox and the directives of the object: subject: config, browser.newtab.url, etc. I can't even scratch try this approach. I can't get the 12 bar blues.

    Well, I know I'm repeating something you've read before, but just for completeness (and also, I suspect this isn't built-in Firefox page):

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste newtab and make a pause so that the list is filtered

    (3) double-click the preference browser.newtab.url and enter your favorite page:

    • (Default) page thumbnails = > subject: newtab
    • Blank tab = > subject: empty
    • Built-in Firefox homepage = > topic: welcome
    • Any other page = > full URL of the page

    Press Ctrl + t to open a new tab and check that it worked. Fixed?

    Some traps:

    If Firefox will not let you change this setting: you can have what is called SearchProtect on your system.

    Firefox if allows you to save your changes, but he doesn't know: one of your extensions may be the substitution of her. You can consult, disable and/or remove extensions on page modules. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click on Extensions

    If the modification works during your session, but during the next startup is return to the unwanted page: you could have a user.js file in your personal settings Firefox (your Firefox profile folder). This article describes how to track down and delete the file: How to fix preferences that will not save.

    A little luck?

  • Have a new 6 but cannot get it to sync with iTunes on my Mac. The two systems have system updates (and both confirm). How can I update iTunes on my phone when he said the latest version?

    Have a new 6s, but cannot get it to sync with iTunes on my Mac. Both systems have system updates (and confirm the latest version). How can I update iTunes on my phone when he said the latest version?

    The message to update iTunes refers to iTunes on your Mac - is your Mac on a high enough version of Mac OS X to support the required iTunes version? If this isn't the case, then your Mac can be changed?

  • Message: "the Security Center service cannot be started. I am running Vista, fully up to date with AntiVirus & Anti Malware, & others. Unable to change the center of security of people with DISABILITIES.

    Message: "the Security Center service cannot be started. I am running Vista, completely up-to-date with Avira AntiVirus, Malwarebytes - Anti-Malware, MS/scans of Windows Security Center (for example MS Fix It programs Center), etc. No Malware has been found. Despite me trying to re - set the Security Center using start > Services > SecurityCenter > change to "Automatic (delayed start)" people with disabilities > start > output the re-creation is not the owner and I'm back with no security - with the same message as the original. I spent hours trying to deal with this. There is no known new applications/programs, and the problem started about 3 days ago. Help requested - thanks. JohnG - Sydney

    Hello

    ·         Are you can change the Security Center service parameter by using a different user account on the computer?

    I suggest you to make sure that Windows Defender is running. Follow the below mentioned articles and check.

    Follow the suggestions below for a possible solution:

    Method 1: I suggest you perform the clean boot and check.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

     

    Note: After troubleshooting, be sure to configure the computer to start as usual as mentioned in step 7 in the above article.

    Method 2: If the method above is not enough, then I suggest refer you the link try the steps and check if that helps:

    How to perform an upgrade on the spot on Windows Vista, Windows 7, Windows Server 2008 & Windows Server 2008 R2

    http://support.Microsoft.com/kb/2255099

     

    Note:

    You can back up data to an external hard drive and no CD. It is essential to back up data even if you do an upgrade on the spot.

    If you are using the original computer and the new laptop image, you will need to purchase a product key to activate the copy of windows installed on the laptop.

    Hope the information is useful.

Maybe you are looking for