cancel
Showing results for 
Search instead for 
Did you mean: 

Any documentation on base64_encode/base64_decode?

Former Member
0 Kudos

Hi benevolent HANA experts,

I am looking for examples for the SQL functions base64_encode and base64_decode.  Specifically, I am wondering if they can be used to insert a blob field from a SQL script, where the blob value is a base64-encoded string. Can someone point me in the right direction?

thanks!

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

SAP HANA doesn't provide those functions on SQL level.

That's something your application code needs to do for you.

- Lars

Former Member
0 Kudos

Hi Lars,

The functions do exist, but maybe just not externally supported.  I found them on another SCN post. You can try this:


select base64_decode('dGVzdGluZw==') from DUMMY;

Both functions seem to operate on varchar input. The problem I'm having is in storing the result as a blob, and then subsequently querying and re-encoding the blob to verify the results.  Just wondering if anyone has gotten this to work?

Thanks,

Charles

lbreddemann
Active Contributor
0 Kudos

They are not in the documentation, which usually means: not supported.

Don't use them for your programs as you won't get any support for that then.

- Lars

Answers (0)