Skip to Content
-1

hdsql can not select result

Aug 15, 2017 at 08:38 AM

64

avatar image
Former Member

Hi Expert:

I have to select some views for results in hana studio , but I excute the same sql in hdsql ,that can not get any result.why is it happened?

10 |10000 characters needed characters left characters exceeded
Former Member

Thank you for your reply, and I will provide some detail:

Sql statement:

SELECT COUNT(*) FROM "_SYS_BIC"."hope.sd/ZCV_SALES_INV_BASE"

"hope.sd/ZCV_SALES_INV_BASE" is the calculation view in the hope->sd package. I find the its view in db.

I used the same user for connect to the hana servier.it is to execute the sql in the hana studio:

and here is the picture for executing in the hdsql below this:

As above, there is not any data for result.
eeg6a.png (6.8 kB)
dfcvb.png (28.7 kB)
0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Lars Breddemann
Aug 23, 2017 at 05:05 AM
0

You wrote that you are using the same user logon.

Please double check this with

SELECT current_user from dummy;

Also, if your view uses TEXTJOINs to generate language dependent text, please check the current session context and compare for both the HANA SQL Studio session and the hdbsql session:

SELECT * FROM M_SESSION_CONTEXT 
WHERE connection_id = current_connection;
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member
Hi Lars:

Thank you for your reply. and I have tried to those that you said, and please check the pictures and help me.

eca5k.png (11.1 kB)
ahdmv.png (28.7 kB)
0
Former Member

Hi Lars:

The problem had been solved, its reason is that language is inconsistent, so there is default english and has no english descriptions. I have changed the language for hdbsql using to the command '\cl LOCELE=zh;LOCALE_SAP=1'

And I have found another problem that is the field type of database table in hana if it is Varchar maybe happened some problem,example:

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

It is caused to conversion field's type, So I changed the field's type from varchar to nvarchar. then it is all ok.

Thank you very much again.

vooun.png (35.5 kB)
0