Generic_M

Can Generic_M be used for sorting Japanese language. As per my reading it looks like Generic_M can only sort Latin based languages but wanted to confirm.

GENERIC_M sorts linguistically alphabetic European scripts: Latin, Cyrillic, Armenian and Georgian. Japanese characters, as any other non-European characters, are sorted by their Unicode code points.
-- Sergiusz

Similar Messages

  • Difference between GENERIC_M and GENERIC_M_CI

    hi all,
    I have just begun looking into the volumes of documentation on multi-lingual sorting support in Oracle. I am basically trying to understand the difference between GENERIC_M and GENERIC_M_CI types of NLS_SORT. My code ran into an oracle bug when using GENERIC_M as NLS_SORT (See Re: Issue sorting with column > 500 chars in length when NLS_SORT is GENERIC_M As a temporary workaround I am trying to use GENERIC_M_CI and see what impact it will have on my application code which needs to support both English and French sorting. Could someone please summarize the difference for me please? In the meantime, Binary NLS_SORT will not work for French, correct?
    Thanks in advance.
    A fellow Oracle user

    Check out Chapter 5, Linguistic Sorting and String Searching of the Globalization Support Guide.
    Specifying a Case-Insensitive or Accent-Insensitive SortUse the NLS_SORT session parameter to specify a case-insensitive or accent-insensitive sort:
    * Append _CI to an Oracle sort name for a case-insensitive sort.

  • Oracle 11g Linguistic NLS SORT Throws Exception

    Hi All,
    I am using oracle 11g and when i try NLS_Sort with Generic_m option, throws ORA-00910 exception. See below for more details
    Select * From v$version
    1 Oracle Database 11g Release 11.1.0.6.0 - Production
    2 PL/SQL Release 11.1.0.6.0 - Production
    3 CORE 11.1.0.6.0 Production
    4 TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    5 NLSRTL Version 11.1.0.6.0 - Production
    Select * From v$NLS_PARAMETERS;
    1 NLS_LANGUAGE AMERICAN
    2 NLS_TERRITORY AMERICA
    3 NLS_CURRENCY $
    4 NLS_ISO_CURRENCY AMERICA
    5 NLS_NUMERIC_CHARACTERS .,
    6 NLS_CALENDAR GREGORIAN
    7 NLS_DATE_FORMAT DD-MON-RR
    8 NLS_DATE_LANGUAGE AMERICAN
    9 NLS_CHARACTERSET WE8MSWIN1252
    10 NLS_SORT    BINARY
    11 NLS_TIME_FORMAT HH.MI.SSXFF AM
    12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    15 NLS_DUAL_CURRENCY $
    16 NLS_NCHAR_CHARACTERSET AL16UTF16
    17 NLS_COMP    BINARY
    18 NLS_LENGTH_SEMANTICS BYTE
    19 NLS_NCHAR_CONV_EXCP FALSE
    I have one table 'Test' in that column TestDesc varchar2(4000). Now if i retrieve the records by
    select sts, it is successfully executed. The same if i do after exec of the below sts, it is
    throwing ORA-00910:specified length too long for its datatype.
    1. ALTER SESSION SET NLS_SORT=GENERIC_m;
    2. Select * From Test order by TestDesc; (It is throwing ORA-00910 exception)
    But the same query/setup is executed successfully in oracle 10g.
    My question:
    Why it is throwing this exception especially in 11g?
    Do i need to excute any alter sts like changing of charactor set..
    Kindly help me to sove this issue.

    Does that mean that 11.2.0.1 (without pse), NLSSORT does not work as intended (documented)?
    Correct. At least, if the related information in bug reports is correct.
    Is there in 11.2.0.2 still silent truncation instead of "... calculates the collation key for a maximum prefix", if there's a difference?
    There is no difference. The term "silent truncation" is not really precise, so the documentation describes the process in a more elaborate way.
    Shouldn't docs mention that a "calculated result" could mean that sorts may sometimes be out of sequence (in-exact collation)?
    Yes, it should. It is sometimes too easy to assume that things obvious to oneself are also obvious to anybody else ;-) I have asked for the following explanation to be added after the relevant doc paragraph:
    "The above behavior implies that two character values whose collation keys (NLSSORT results) are compared to find the linguistic ordering are considered equal if they do not differ in the prefix described above even though they may differ at some further character position. As the NLSSORT function is used implicitly to find linguistic ordering for comparison conditions, BETWEEN condition, IN condition, ORDER BY, GROUP BY, and COUNT(DISTINCT), those operations may return results that are only approximate for long character values. This is a restriction of the current comparison architecture. Currently, the only way to guarantee precise linguistic comparison results is to not compare character values that are longer than 499 characters for monolingual collations and 124 characters for multilingual collations."
    -- Sergiusz
    Edited by: S. Wolicki, Oracle on May 5, 2011 1:17 PM
    Lowered the pessimistic length for multilingual sorts from 249=floor((2000-3)/8) to 124=floor((2000-3)/16)

  • How to use oracle nlssort function in order by clause?

    If I need to use linguistic sort feature in Oracle, I can write a SQL like that:
    Select product_name from product
    order by NLSSORT(product_name, 'NLS_SORT=GENERIC_M');
    How can I generate a SQL like this by Toplink?

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • Collection function taking more time to execute

    Hi all,
    I am using a collection function in my sql_report it is taking plenty of time to return rows, is there any way to get the resulted rows(using collection) without consuming more time.
    SELECT tab_to_string(CAST(COLLECT(wot_vw."Name") AS t_varchar2_tab)) FROM  REPORT_VW wot_vw
    WHERE(wot_vw."Task ID" = wot."task_id") GROUP BY wot_rept_vw."Task ID") as "WO"
    from   TASK_TBL wot
    INNER JOIN
    (SELECT "name", MAX("task_version") AS MaxVersion from TASK_TBL
             GROUP BY "name") q
    ON (wot."name" = q."name" AND wot."task_version" = q.MaxVersion)
    order by NLSSORT(wot."name",'NLS_SORT=generic_m')
    Here this order by is causing problem
    Apex version is 4.0
    Thanks.
    Edited by: apex on Feb 21, 2012 7:24 PM

    'My car doesn't start, please help me to start my car'
    Do you think we are clairvoyant?
    Or is your salary subtracted for every letter you type here?
    Please be aware this is not a chatroom, and we can not see your webcam.
    Sybrand Bakker
    Senior Oracle DBA

  • Linguistic index not being used

    I am using 10G database and am having an issue that my linguistic index is not being used during sorting.
    Any help will be appreciated.
    Table structure.
    create table TEST
    ID CHAR(256) not null,
    NAME VARCHAR2(100) not null,
    DESIGNATION VARCHAR2(200)
    alter table TEST add constraint ID primary key (ID)
    create index TEST_IDX on TEST (NLSSORT(NAME,'nls_sort=''GENERIC_M'''))
    Number of rows - 1 million
    Query being run.
    alter session set nls_sort='Generic_M';
    select * from test order by name;
    Explain plan
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 1001K| 270M| | 70194 (1)| 00:14:0
    3 |
    | 1 | SORT ORDER BY | | 1001K| 270M| 579M| 70194 (1)| 00:14:0
    3 |
    | 2 | TABLE ACCESS FULL| TEST | 1001K| 270M| | 9163 (1)| 00:01:5
    0 |
    --------------------------------------------------------------------------------

    I don't think that's true, at least with the nls_sort function. I'm running into the same problem now, and I've traced with and without the use of the index, and it's definitely better with the index.
    Here it is, not using the index:
    SQL> select * from test where col2='sfs';
    no rows selected
    Execution Plan
    Plan hash value: 1357081020
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 366 | 2 (0)| 00:00:01 |
    |* 1 | TABLE ACCESS FULL| TEST | 1 | 366 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter(NLSSORT("COL2",'nls_sort=''BINARY_CI''')=HEXTORAW('7366730
    0') )
    Note
    - dynamic sampling used for this statement
    Statistics
    87 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    339 bytes sent via SQL*Net to client
    327 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    And here it is WITH the index:
    SQL> select /*+ index_asc(test index1) */ * from test where col2='adsfas';
    no rows selected
    Execution Plan
    Plan hash value: 2960817241
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
    |
    | 0 | SELECT STATEMENT | | 1 | 366 | 2 (0)| 00:0
    0:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| TEST | 1 | 366 | 2 (0)| 00:0
    0:01 |
    |* 2 | INDEX FULL SCAN | INDEX1 | 1 | | 1 (0)| 00:0
    0:01 |
    Predicate Information (identified by operation id):
    2 - access(NLSSORT("COL2",'nls_sort=''BINARY_CI''')=HEXTORAW('6164736661730
    0') )
    filter(NLSSORT("COL2",'nls_sort=''BINARY_CI''')=HEXTORAW('6164736661730
    0') )
    Note
    - dynamic sampling used for this statement
    Statistics
    11 recursive calls
    0 db block gets
    7 consistent gets
    0 physical reads
    0 redo size
    339 bytes sent via SQL*Net to client
    327 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    Oddly enough, the optimizer chooses not to use the index on this example table I created.

  • PDF printing German umlauts

    Hello all,
    I'm trying to use the new "Report Query" and "Report Layout" feature. First of all I have to say that my PDF printing setup works generally. My problem has nothing to do with that. Here's what I'm trying to do and what my problem is:
    I'm using a report query on a table which has data with german umlauts (äöüÄÖÜ) and special characters (ß) in it. Trying to print that report with the standard layout works. I see my german nls characters. If I try to apply a XSL-FO stylesheet I get # signs for my german nls characters. I played with the encoding of my stylesheet but that has no effect. TRANSLATE ... USING or CONVERT hasn't any effect either. I also changed the PlsqlNLSLanguage setting in my dads.conf to GERMAN_GERMANY, but that also has no effect. Now I'm pretty lost.
    Anybody out there has some tips on using german special characters in report queries with own written XSL-FO stylesheets ?
    Regards Markus

    Hi Jes,
    this is the query:
    select name, title, original_title,
    to_char ( purchase_date, 'dd.mm.yyyy' ) as purchase_date,
    to_char ( price, '990D00' ) as price,
    currency
    from authors a,
    books b
    where a.id = b.author_id
    order by nlssort ( name, 'nls_sort = generic_m' ),
    nlssort ( title, 'nls_sort = generic_m' )
    here's an excerpt from the XML:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ROWSET>
    - <ROW>
    <NAME>Buchheim, Lothar Günter</NAME>
    <TITLE>Das Boot</TITLE>
    <ORIGINAL_TITLE />
    <PURCHASE_DATE>21.05.1997</PURCHASE_DATE>
    <PRICE>0.00</PRICE>
    <CURRENCY>DM</CURRENCY>
    </ROW>
    - <ROW>
    <NAME>Stroustrup, Bjarne</NAME>
    <TITLE>The C Programming Language</TITLE>
    <ORIGINAL_TITLE />
    <PURCHASE_DATE>21.05.1997</PURCHASE_DATE>
    <PRICE>0.00</PRICE>
    <CURRENCY>DM</CURRENCY>
    </ROW>
    </ROWSET>
    as you can see the umlauts (ü) are there but the + signs are missing. The XSL-FO is indeed too big to post here. If you give me your email address, I'll mail it in zip format to you.
    Regards Markus

  • Primary, Secondary and Tertiary Pass

    Dear OTN Members:
    I am working on Locale builder utility for the development of URDU locale. As u all must have
    been aware there are 4 options (language definition, territory definition, character set,linguistic sorting). I have configured the first two options (language definition, territory definition) working on third option(Character set) and will move on the linguistic sorting in just couple of hours.
    I have to develop a multilingual locale in URDU. I checked GENERIC_M locale in Locale builder
    and tried to understand its development technique But unable to grab anything from it.
    I am workign on the option "UNICODE COLLATION SEQUENCE" present in Linguistic sorting. But in this
    screen a tree has been made comprises of Primary, Secondary and Tertiary Pass.
    Will any one have this idea that
    1)
    "How this tree of primary, secondary and tertiary pass be
    made in any English"
    2)
    How this sort of tree can be configured in Arabic / Urdu language
    Plz reply soon..
    REgards
    SAlman

    1)
    "How this tree of primary, secondary and tertiary pass be
    made in any English"
    There is a white paper on OTN that explains this:
    http://otn.oracle.com/tech/globalization/pdf/TWP_Sorting_10gR1.pdf
    2)
    How this sort of tree can be configured in Arabic / Urdu language
    That's a tough one because there doesn't seem to be a standard for Urdu sorting. Probably modifying GENERIC_M for whatever your requirements are is best.

  • Language related sorting problems

    In our multilingual application we are using dutch (primary), french and english.
    On some pages we have sorted tables and/or sorted shuttle lists.
    There is some strange behavior on those pages.
    It seems that dutch and french sort differently than english.
    Dutch and french sort A-B-C-0-1-2-3
    English sorts 0-1-2-3-A-B-C
    When looking at our nls paramaters I don't see a value in nls_sort, so I'm assuming that Apex sets this property somewhere in the application. How can I change this behavior, because we always want to sort like 0-1-2-3-A-B-C, in all languages.

    Actually there is no Page 0 Process...however...
    on page 0 you can create a region based on PL/SQL content. If you define that region as
    BEGIN
    execute immediate 'alter session set nls_sort = GENERIC_M';
    END;
    It works also...
    You can check that by adding a SQL report region based on:
    select * from v$nls_parameters
    If you set the Condition of the Page 0 PL/SQL region to 'Never' : NLS_SORT shows 'BINARY', if you enable it (or on some pages...), it will say 'GENERIC_M'.

Maybe you are looking for

  • MSI K7N2 Delta ILSR

    A few days ago i put in my 120Gb Western from my old comp (witch my dad use. He really needs that comp), and everything is working just fine. But the my dads comp didn't work. So i put the 120Gb back in2 his, and that did it. His comp is working fine

  • Interest calculation type-Z-Penalty Interest Calculation

    Hi all !! I would like to know  about the Interest calculation type-Z-Penalty Interest Calculation, if  it is necesary to do some aditional customizing , and which are the differences between Item Interest Calculation and Penalty Interest Calculation

  • Suddenly cannot send Mail

    I'm in a tech support loop. Qwest is my ISP, Emerald Webhost is my domain host. My outgoing SMTP server is mail.mydomain.com (at Emerald). Suddenly, a few days ago, I can no longer send mail via Apple Mail from my DSL connection. These two laptops ca

  • Convert Scientific Notation to Float

    Hello How can we convert Scientific notation to float. e.g. 1.23E-3(string) as  0.00123(float) Thanks Solved! Go to Solution.

  • Where is Net8

    All, I am planning to use Net8 as a connection manager for an mts database. It will be on a separate server. I want to see if it will lower cpu footprint on the database by reducing the no. of connections on the database and off loading the work to M