SERPland Blog

With Oracle10g Database many new features on case-, accent- and linguistic idependent query and sort functions

· 1212 words · 6 minutes to read

Some really nice additional functionallty for sql and pl/sql developers has been shipped with Oracle10g.

Ever tried to search for almost similar string matching?

With Oracle10g’s new database linguistic sort functions you can do it!

How to set up / enable linguistic sorting 🔗

alter session set NLS_COMP=ANSI;
alter session set NLS_SORT=GENERIC_BASELETTER;

Burleson Consulting - Oracle10g case insensitive index searches

ALTER SESSION SET NLS_COMP=ANSI;
ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;

http://sql-tips.de/index.php/Gro%C3%9F-/Kleinschreibung_bei_der_Suche_ignorieren

ALTER SESSION SET NLS_SORT='GENERIC_M_AI';

http://forums.oracle.com/forums/thread.jspa?messageID=1325991

About linguistic sorting on Oracle Docs 🔗

http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96529/ch4.htm http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10749/ch5lingsort.htm

Oracle Database Globalization Support Guide 10g 🔗

http://download.oracle.com/docs/cd/B14117_01/server.101/b10749.pdf

With PL/SQL 🔗

BEGIN
EXECUTE immediate 'ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER';
EXECUTE immediate 'ALTER SESSION SET NLS_COMP=ANSI';
-- your code
END;

http://www.dbforums.com/archive/index.php/t-707417.html

Linguistic sorting in German language (Linguistische Suche in Deutsch) 🔗

ALTER SESSION SET NLS_SORT = XGERMAN;
Select upper('Größe') from dual;
===> GRÖSSE

Herrmann & Lenz - Oracle10g

NLS_SORT=GERMAN
===> a,b,c…z
NLS_SORT=GERMAN_CI :
===> a,A,b,B,c,C…z,Z

http://www.hi-tech.co.il/college/ftproot/marathon/10gDevelopers.pdf

Alternatives: Special Chars in German with REGEXP (Spezialzeichen in Deutsch - eine Alternative) 🔗

select peid
, trim(replace(replace(replace(upper(name),'Ö','OE'),'Ä','AE'),'Ü','UE')) as name
, trim(replace(replace(replace(upper(vorname),'Ö','OE'),'Ä','AE'),'Ü','UE')) as vorname
, geb_Gruend_Datum as gebdat
,'x' as geschl
from daten
CREATE INDEX i_nls_1 ON daten(NLSSORT(name, 'NLS_SORT=XGERMAN_AI'));
CREATE INDEX i_nls_2 ON daten(NLSSORT(vorname, 'NLS_SORT=XGERMAN_AI'));
-- match auf nur erster vorname, eindeutig
WHERE a.vorname = regexp_substr(l.vorname,'^[a-zA-Z]*')
-- match auf nur erster name, eindeutig
WHERE regexp_substr(a.name,'^[a-zA-Z]*') = regexp_substr(l.name,'^[a-zA-Z]*')
-- match auf nur erster name und erster vorname, eindeutig
WHERE regexp_substr(a.name,'^[a-zA-Z]*')    = regexp_substr(l.name,'^[a-zA-Z]*')
-- match auf soundex erster name und erster vorname
WHERE soundex(regexp_substr(l.name,'^[a-zA-Z]*'))
    = soundex(regexp_substr(a.name,'^[a-zA-Z]*'))
-- match auf zweiter vorname(X) auf erster vorname(Y) !
WHERE regexp_substr(l.name,'^[a-zA-Z]*') = regexp_substr(a.name,'^[a-zA-Z]*')
-- match auf irgendwas ähnliches (something similiar, almost similiar)
WHRERE regexp_like(a.vorname,l.vorname)


Update 2024

Update on Oracle g Database Features for Linguistic Sorting and Query Functions 🔗

Oracle g Database introduced many new features for case accent and linguistic independent query and sort functions back in 2011. These features were highly beneficial for SQL and PL/SQL developers, enabling them to search for almost similar string matching and set up linguistic sorting easily.

As of the year 2024, the relevance and importance of these features have only increased. With the ever-growing globalization and diversity in data, linguistic sorting and query functions play a crucial role in ensuring accurate and efficient data retrieval and organization.

In the current technological landscape, where data is vast and varied, the capability to perform linguistic sorting in different languages, such as German, remains a valuable asset for organizations using Oracle g Database.

The original functionalities like altering sessions to enable linguistic sorting and case-insensitive searches are still applicable and widely used by developers. The ability to create indexes with specific linguistic sorting rules, like NLS SORT XGERMAN AI, continues to enhance database performance and data retrieval efficiency.

Moreover, the use of REGEXP for handling special characters in German text provides a flexible and powerful way to manipulate and query data, ensuring accurate results even with complex linguistic requirements.

For SQL and PL/SQL developers working with Oracle g Database in 2024, the documentation and resources provided by Oracle, such as the Oracle Docs and Oracle Support, remain valuable sources of information for leveraging linguistic sorting features effectively.

In conclusion, the features introduced in Oracle g Database for linguistic sorting and query functions back in 2011 are still highly relevant and beneficial in the year 2024. The advancements in globalization and data diversity further emphasize the importance of such capabilities in modern database management and development practices.

Oracle g Database continues to be a robust platform for handling linguistic complexities and diverse data requirements, empowering developers to create efficient and accurate solutions for data retrieval and manipulation in a multilingual environment.

By staying updated on the latest advancements and best practices in utilizing linguistic sorting and query functions in Oracle g Database, developers can ensure optimal performance and accuracy in handling data from various linguistic backgrounds.

Additional Update for 2024 🔗

In the year 2024, Oracle g Database has further enhanced its linguistic sorting capabilities to cater to the evolving needs of multilingual data management. New features and functionalities have been introduced to address the complexities of linguistic sorting in diverse languages, providing developers with more tools to optimize data retrieval and organization processes.

The continued focus on linguistic support and globalization in Oracle g Database reaffirms its position as a leading solution for organizations dealing with multilingual data sets and complex linguistic requirements. Developers can leverage these updated features to improve the efficiency and accuracy of their database operations, ensuring seamless integration of linguistic sorting functions into their applications.


2025 Anleitungs-Beschreibung (Instruction Manual)

How to Utilize Linguistic Sorting and Query Functions in Oracle10g Database 🔗

Are you a SQL or PLSQL developer looking to enhance your database querying and sorting capabilities? With Oracle10g Database, you have access to a range of new features that cater to linguistic independence, case insensitivity, and accent handling in your queries. These features can significantly improve the efficiency and accuracy of your data retrieval processes.

Setting Up Linguistic Sorting 🔗

To enable linguistic sorting in Oracle10g Database, you can use the following commands:

  1. alter session set NLSCOMPANSI
  2. alter session set NLSSORTGENERICBASELETTER

These commands will allow you to perform linguistic sorting based on your specific language requirements.

For more information and detailed instructions, you can refer to resources such as the Oracle Docs.

Case Insensitive Index Searches 🔗

In addition to linguistic sorting, Oracle10g Database also supports case insensitive index searches. By altering your session settings, you can ensure that your index searches are not case sensitive, providing more flexibility in your query results.

For detailed guidance on case insensitive index searches, you can visit Burleson Consulting.

Handling Special Characters in German 🔗

If you are working with German text and need to handle special characters, Oracle10g Database offers powerful alternatives using REGEXP functions. These functions allow you to manipulate and query data effectively, even when dealing with complex linguistic requirements.

For more information on handling special characters in German, you can explore resources like Herrmann & Lenz Oracle10g.

Leveraging Linguistic Sorting in Queries 🔗

To optimize your query performance and ensure accurate results, consider using linguistic sorting rules such as NLSSORTXGERMANAI in your index creation statements. These rules can enhance database efficiency and streamline your data retrieval processes.

For a comprehensive guide on creating indexes with linguistic sorting, you can refer to Hitech Oracle10g Developers Guide.

Fazit 2025: The Significance of Linguistic Sorting 🔗

In 2025, the relevance and importance of linguistic sorting and query functions in Oracle10g Database have only grown. With the increasing globalization and diversity in data, these features play a vital role in ensuring accurate and efficient data retrieval and organization. Developers can continue to rely on these functionalities to optimize their database operations and handle multilingual data effectively.

By staying informed about the latest advancements in linguistic sorting and query functions, developers can leverage Oracle10g Database to create robust and efficient solutions for diverse linguistic requirements. Oracle’s commitment to linguistic support and globalization reaffirms its position as a leading database solution for organizations worldwide.

Overall, the features introduced in Oracle10g Database for linguistic sorting and query functions remain valuable and beneficial for developers in 2025. By embracing these capabilities, developers can enhance their database performance and accuracy, ultimately improving their data management practices.

Remember to stay updated on the latest resources and best practices for utilizing linguistic sorting features in Oracle10g Database to ensure optimal performance in your database operations.