cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Δ in hdbsql

Former Member
0 Kudos

Hi all,

I've got a SELECT that returns Δ (U+0394) both in a column name and value. Studio works fine, however in hdbsql I get the error

* -10427: Conversion of parameter/column (5) from data type VARCHAR1 to ASCII failed

and neither -resultencoding nor -B have any effect on this. Has anyone any idea how to make this work? I'm even not interested in the result, I only want the execution time, so throwing out the selected tuples would be fine.

Cheers,

-- Micha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Micha,

You can use the UNICODE and NCHAR functions for the Δ logo (Unicode 916), although in the hdbsql (for MS DOS - I'm guessing it depends on the fonts), it will show up as the other Delta Greek character: δ

Here are the screenshots from HDB Studio and HDB SQL for comparison:

Regards,

Ferry

Former Member
0 Kudos

Thanks Ferry, that's it :-). Linux NCHAR(916) shows the correct character.

-- Micha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Micha,

I am guessing, based in the info provided, that you are binding an ASCII based parameter to an NVARCHAR column, and this is the source of the problem.  Try replacing with a Unicode based parameter.

Regards,

David

Former Member
0 Kudos

Hi David,

as to types, it is a view with constant values in a CASE expression, so no types are explicitly specified. A similar error can be easily reproduced directly:

hdbsql=> select 'Δ' AS "Δ" FROM dummy;
Δ
,
* -10427: Conversion of parameter/column (1) from data type VARCHAR1 to ASCII failed
* -10427: Conversion of parameter/column (1) from data type VARCHAR1 to ASCII failed

Obviously, hdbsql thinks that the value is ASCII but I haven't found a way to tell it otherwise. I cannot materialize the view, this is a no-no in Hana :-).

Cheers,

-- Micha

Former Member
0 Kudos

Hi Micha,

I ran the query without problem in HANA Studio (see below).  Perhaps it is related to the version of HANA you are using.  I was using SP6.

Regards,

David

Former Member
0 Kudos

David, please read what I've written, the problem is with hdbsql, not with studio.

-- Micha