Collation Settings for MSSQL Server Destination (2024)

Warning: Deprecated articles
You are using the old version of the knowledge base for Xtract Universal.
Make sure to use the knowledge base within the new HelpCenter for Xtract Universal.

The following article describes a common problem that occurs when pushing SAP data into an SQL server database when collation is not set case-sensitive.The depicted example shows how to customize the drop & create SQL server statement within Xtract Universal destination settings.

Collation SQL Server #

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data. Collations that are used with character data types, such as char and varchar, difine the code page and corresponding characters that can be represented for the corresponding data type.

Collation can be set up on three different levels:

MSSQL server offers different collation statements. The following excerpts provide the necessary adaptions for the given example:

option description
Case-sensitive (_CS) Distinguishes between uppercase and lowercase letters. If this option is selected, lowercase letters sort ahead of their uppercase versions. If this option isn’t selected, the collation is case-insensitive. Which means, SQL Server considers the uppercase and lowercase versions of letters to be identical for sorting purposes. You can explicitly select case insensitivity by specifying _CI.
Accent-sensitive (_AS) Distinguishes between accented and unaccented characters. For example, “a” is not equal to “ấ”. If this option isn’t selected, the collation is accent-insensitive. Which means, SQL Server considers the accented and unaccented versions of letters to be identical for sorting purposes. You can explicitly select accent insensitivity by specifying _AI.

Check the complete list of usable collations.

For more detailed information, see Microsoft site. The depicted example shows the column collation within Xtract Universal with Custom SQL statement.

SQL Server Management Studio (SSMS) #

Check the database settings xu_fas, following collation statement appears: Latin1_General_100_CI_AI.

option description
_CI case-insensitive
_AI accent-insensitive

Collation Settings for MSSQL Server Destination (1)

Xtract Universal #

We want to extract the SAP table MAKT from ECC:

  1. Create an table extraction as described in Online Help article.
    • The look-up process loads the corresponding metadata from our SAP object MAKT. Collation Settings for MSSQL Server Destination (2)
    • Composite primary key consists of the table fields: MANDT, MATNR, SPRAS with a unique constraint.
    • SAP field SPRAS is of data type LANG with a length 1.Collation Settings for MSSQL Server Destination (3)
  2. Create a simple Where clause statement like: MATNR = ‘000000000000000038’ AND ( SPRAS = ‘d’ OR SPRAS = ‘D’ )
  3. Click [Load live preview]. The result is the following: two data entries - the SAP database interprets the data records with upper-case ‘D’ and lower-case ‘d’ in the field SPRAS as different data records.
  4. Select an MSSQL server destination for the previously edited extraction and click [Run].
    The destination following error occurs during the extration.

System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint ‘PK__makt__3483F06C110B42CD’. Cannot insert duplicate key in object ‘dbo.makt’.The duplicate key value is (800, 000000000000000038, d)

Workaround #

As explained above Xtract Universal isn’t able to push the data of ‘MAKT’ into MSSQL server due to used collation statement of the database. In this case, the user has to customize the SQL statement Preparation of the MSSQL destination settings.

  1. Change the default value Drop & Create to Custom SQL and click [Edit SQL].
  2. Select the Drop & Create entry from the drop-down menu and click on [Generate Statement] for table MAKT.
  3. Customize column collation for field SPRAS as shown below.
  4. The extraction to MSSQL server ends with the following message ‘Extraction finished successfully’.
IF (object_id('MAKT') IS NOT NULL)BEGIN DROP TABLE [MAKT];END;CREATE TABLE [MAKT] ( [MANDT] NATIONAL CHARACTER VARYING(3) NOT NULL, [MATNR] NATIONAL CHARACTER VARYING(18) NOT NULL, [SPRAS] NATIONAL CHARACTER VARYING(1) COLLATE Latin1_General_100_CS_AS NOT NULL, [MAKTX] NATIONAL CHARACTER VARYING(40), [MAKTG] NATIONAL CHARACTER VARYING(40), PRIMARY KEY ( [MANDT], [MATNR], [SPRAS] ));
Collation Settings for MSSQL Server Destination (2024)
Top Articles
Will God Solve Our Financial Problems?
FedEx | System Down
Where are the Best Boxing Gyms in the UK? - JD Sports
Www.1Tamilmv.cafe
Access-A-Ride – ACCESS NYC
Women's Beauty Parlour Near Me
The Idol - watch tv show streaming online
David Packouz Girlfriend
Music Archives | Hotel Grand Bach - Hotel GrandBach
What Happened To Father Anthony Mary Ewtn
Weather Annapolis 10 Day
Valentina Gonzalez Leaked Videos And Images - EroThots
DIN 41612 - FCI - PDF Catalogs | Technical Documentation
The Weather Channel Facebook
Best Fare Finder Avanti
“In my day, you were butch or you were femme”
National Office Liquidators Llc
Puretalkusa.com/Amac
Walgreens Tanque Verde And Catalina Hwy
Caledonia - a simple love song to Scotland
Kirksey's Mortuary - Birmingham - Alabama - Funeral Homes | Tribute Archive
Pokemon Unbound Shiny Stone Location
Heart Ring Worth Aj
Boston Dynamics’ new humanoid moves like no robot you’ve ever seen
Coomeet Premium Mod Apk For Pc
Mini Handy 2024: Die besten Mini Smartphones | Purdroid.de
The Boogeyman (Film, 2023) - MovieMeter.nl
Nottingham Forest News Now
Craigslist Brandon Vt
Healthy Kaiserpermanente Org Sign On
Till The End Of The Moon Ep 13 Eng Sub
Deepwoken: Best Attunement Tier List - Item Level Gaming
Life Insurance Policies | New York Life
Orange Pill 44 291
Car Crash On 5 Freeway Today
Workday Latech Edu
Tokyo Spa Memphis Reviews
About :: Town Of Saugerties
Ise-Vm-K9 Eol
Discover Things To Do In Lubbock
VPN Free - Betternet Unlimited VPN Proxy - Chrome Web Store
The Horn Of Plenty Figgerits
20 Mr. Miyagi Inspirational Quotes For Wisdom
Bank Of America Appointments Near Me
Mlb Hitting Streak Record Holder Crossword Clue
Bradshaw And Range Obituaries
Evil Dead Rise - Everything You Need To Know
Zadruga Elita 7 Live - Zadruga Elita 8 Uživo HD Emitirani Sat Putem Interneta
Is Chanel West Coast Pregnant Due Date
Home | General Store and Gas Station | Cressman's General Store | California
Strange World Showtimes Near Century Federal Way
King Fields Mortuary
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 5911

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.