Skip to Content

DB error: Inconsistent datatype: TEXT type is incompatible with NCLOB type

Hi,

I try to write from a datatype TEXT to datatype LargeString, but it fails.

Error: com.sap.hana.di.procedure: Database error 266: : inconsistent datatype: TEXT type is incompatible with NCLOB type: line 52 col 2 (at pos 2239) [8201003]

But in the docu of data type mapping its required..

https://help.sap.com/doc/52715f71adba4aaeb480d946c742d1f6/2.0.00/en-US/a83fe9b8de1c4f4bbee3eea675851a04.html

Any ideas? Thanks!

Add a comment
10|10000 characters needed characters exceeded

  • Please can you add more details to your question to explain the people here what your are trying to do instead of just giving an error message without context?

    - What you are trying to do and how (plain SQL?)?

    - Are you working with CDS artifacts, because you referenced to the mapping how HANA data types are mapped to CDS data types (and vice versa)?

    - ...

  • Hi Florian,

    thanks for your fast response!

    I try to write within a Stored Procedure (plain SQL) from a table (from XSC to XSA) to a hdbcds artifact.

    From SAP Table: N2PMDETEXT

    Field: CONTENT

    SQL DATA TYPE: Text

           UPDATE "TBASE.db.data::sap_tbase.Y0000034_RadiologieBefunde"
                  SET "MANDT" = cur_row."MANDT",
    		 	 "DOKAR" = cur_row."DOKAR",
    		 	 "DOKNR" = cur_row."DOKNR",
    		 	 "DOKVR" = cur_row."DOKVR",
    		 	 "DOKTL" = cur_row."DOKTL",
    		 	 "N2LEISTID" = cur_row."N2LEISTID",
    		 	 "UPDAT_N2PMDETEXT" = cur_row."UPDAT",
                             "CONTENT_N2PMDETEXT" = cur_row."CONTENT"             !! Tried this
    		 	// "CONTENT_N2PMDETEXT" = TO_NCLOB(cur_row."CONTENT") !! Tried this
    		   WHERE "MANDT" = cur_row."MANDT" AND "DOKAR" = cur_row."DOKAR" 
    		   AND "DOKNR" = cur_row."DOKNR" AND "DOKVR" = cur_row."DOKVR" 
    		   AND "DOKTL" = cur_row."DOKTL";
    
    
    Entity Y0000034_RadiologieBefunde { 
    key MANDT: String(3); // Mandant
    key DOKAR: String(3); // Dokumentart
    key DOKNR: String(25); // Dokumentnummer
    key DOKVR: String(2); // Dokumentversion
    key DOKTL: String(3); // Teildokument
    N2LEISTID: String(10); // Schlüssel für die Leistung
    UPDAT_N2PMDETEXT: String(8); // IS-H: Änderungsdatum
    CONTENT_N2PMDETEXT: LargeString;
    }

    If I miss something else, pls. let me know! Thank you!

  • Ok, I found this nice explanations for the differences of data type NCLOB and TEXT .

    https://help.sap.com/doc/cbed2190ee2d4486b0bbe0e75bf4b636/16.0.3.0/en-US/02b0331bcbaa414fb687dfccdbd64cbb.html

    I suppose that is was wrong to use a type TEXT for this "replication" table N2PMDETEXT which consumes the sap table N2PMDETEXT from SAP system. The data type of the original sap table is a STRING. So I guess it should be a NCLOB in this case.

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.