Skip to Content

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


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

Error: 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..

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


           UPDATE ""
                  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 .

    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.