cancel
Showing results for 
Search instead for 
Did you mean: 

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

draschke
Active Contributor
0 Kudos

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

Any ideas? Thanks!

pfefferf
Active Contributor
0 Kudos

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)?

- ...

draschke
Active Contributor
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

draschke
Active Contributor
0 Kudos

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/02b0331bcbaa414fb687dfccdbd...

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.

Answers (0)