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

  • Get RSS Feed

0 Answers