Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    56

    Unanswered: Will this work in Oracle Procedure

    Hello all,

    will this condition work in oracle pl/sql procedure

    if c.languagename='Französisch' then

    end if;

    please consider it checks with some Unicode character set Französisch, which has one greman character o involved in this.

    please let me know how should i handle in this case.


    thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I don't use German, but everything's fine in Croatian. Here's an example:
    Code:
    SQL> create table test (country varchar2(20));
    
    Table created.
    
    SQL> insert into test values ('Njemačka');
    
    1 row created.
    
    SQL> insert into test values ('Mađarska');
    
    1 row created.
    
    SQL> set serveroutput on
    SQL> begin
      2    for c in (select country from test) loop
      3      if c.country = 'Njemačka' then
      4         dbms_output.put_line('Germany');
      5      elsif c.country = 'Mađarska' then
      6         dbms_output.put_line('Hungary');
      7      end if;
      8    end loop;
      9  end;
     10  /
    Germany
    Hungary
    
    PL/SQL procedure successfully completed.
    
    SQL>
    You need to correctly set NLS settings, and there should be no problem. Check the documentation.

    Just for your information: I use Oracle 10g XE on MS Windows XP. In registry, NLS_LANG is set to CROATIAN_CROATIA.WE8MSWIN1252. According to a table on this page, you'd set it to GERMAN_GERMANY.WE8MSWIN1252.

    If I alter session, I can use German:
    Code:
    SQL> alter session set nls_language = german;
    
    Session wurde geńndert.
    
    SQL> insert into test values ('Französisch');
    
    1 Zeile wurde erstellt.
    
    SQL> select * from test;
    
    COUNTRY
    --------------------
    Njemačka
    Mađarska
    Französisch
    
    SQL>
    So - I guess you should be able to do that as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •