cancel
Showing results for 
Search instead for 
Did you mean: 

Data Type Conversion not working - Join failing

KamalMehta
Advisor
Advisor
0 Kudos


Hi Experts,

I have 2 join 2 views in HANA Studio.

1.  1 of those views is CV , Containing Analytics View based upon SAP BW DSO (with no measure only characteristics).Here all Data Types in the Analytics views are NVARCHAR.

2.  The other one is CV based upon some  SAP TM Tables and as SAP TM Tables has Parent/DB Key which are VARBINARY format.

I tried doing data conversion by creating SQL Script based CV from NVARCHAR to VARBINARY using TO_NVARCHAR Function but its getting converting into 64 character and the same is still not matching.

Same way i treid for the other one from VARBINARY to NVARCHAR using TO_NVARCHAR option but it didn't do anything. Column value  remain same.

Any help would be highly appreciated.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi  kamal Mehta,

  I hope this work.

CAST( <column> as VARBINARY) Function  to converting  NVARCHAR  to  VARBINARY

In this <column> is  NVARCHAR column.

  For more information ---- CAST - SAP HANA SQL and System Views Reference - SAP Library



Regrads,

Khaga.

former_member182114
Active Contributor
0 Kudos

Hi Kamal,

Is this VARBINARY on SAP, the GUID 64 positions?

We faced similar on SP7 if I remind correctly it got supported on SP8, at least I don't remember that it's an issue now that we are on rev82.

What HANA revision you are using?

What is the error you receive on first case?

Regards, Fernando Da Rós

KamalMehta
Advisor
Advisor
0 Kudos

Hi Ros,

Thanks.

VARBINARY - All SAP TM Tables are related via DB keys , Parent Keys etc.

GUID i think is in SAP CRM.

We are on Revision 85.

I am not getting any error but the join is not working.

Regards

former_member182114
Active Contributor
0 Kudos

Hi Kamal,

I took a look on this topic, and look on help Data Types - SAP HANA SQL and System Views Reference - SAP Library (table 9) which points that you can convert to varbinary, but not from.


Here I did a quick test and it worked, with a RAW on DDIC ABAP length 16 and the NVARCHAR with length 32.


Check if is possible to you use to_varbinary on attribute from BW DSO source. If not work post some pictures from both sources that you are trying to join.

Regards, Fernando Da Rós