Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Converting BLOB to Char in SAP HANA using SQL

I need to cast a BLOB to varchar format in HANA database using SQL query. Below is my code:

select 

cast("DESCRIPTION" as varchar) "D"

from "DESC"

I get an error message: “Inconsistence datatype” as below:

Could not execute 'select cast("DESCRIPTION" as varchar) "D" from "DESC"' in 20 ms 181 µs . 

SAP DBTech JDBC: [266]: inconsistent datatype:


1 Answer
SAP Expert

You can perform varchar casting using following query:

SELECT TO_ALPHANUM(col) FROM ......

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.