Skip to Content
0
Sep 10, 2018 at 02:08 PM

CALC VIEW: hextoraw('41 42') results in error: "Error: SAP DBTech JDBC: [264]:"

690 Views

Hi all,

I'm on HANA 1.00.122.12.1502962396 (fa/hana1sp12) andI have a calculation view consisting of a projection on SYS.DUMMY with a calculated column with this (column engine) expression:

hextoraw('4142')

When I query the calculation view, this is fine. When I add another calculation column with this expression:

hextoraw('41 42')

(So, same two bytes, but with a space inbetween), I get this error when I query the view:

"Error: SAP DBTech JDBC: [264]: invalid datatype: the value has an invalid hexadecimal format at function hextobin() at function hextobin()"

I'd like to understand what the problem is.
In the documentation for hextoraw (https://help.sap.com/viewer/fc5ace7a367c434190a8047881f92ed8/2.0.03/en-US/f5a9ca3718354a499a98ba61ae3da170.html) , it reads:

"Convert a hexadecimal representation of bytes to a string of bytes. The hexadecimal string may contain 0-9, upper or lowercase a-f and no spaces between the two digits of a byte; spaces between bytes are allowed."

I'd think that in '41 42' the space is indeed between two bytes (41 and 42), so what's the matter?

thanks in advance and best regards,

Roland.