Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

In AMDP how to join table(s) with guid c22 to guid c32?

RyanK
Explorer
0 Kudos
1,069
  • SAP Managed Tags:

As the title says I have to join 2 tables one with a column that has a guid in c32 format to another table that has the same guid but in C22 format. A further complication is that the 1st table's guid is actually in a generic nvarchar(50) instead of 32. The second table is nvarchar(22).

I can do the same on the abap side but I really need an answer in the sqlscript side due to massive data volumes.

ie:

GUID_C32 = 0050569C5B6F1EE88AA45A98B8682B89

To:

GUID_C22 = 051Md5jl7kYAf5gOk6WhYG

Also have some parts of the necessary join that use varbinary(16) - so have those variants to convert from/to as well.

Any help would be appreciated. I am working in a sqlscript amdp so either a query or sqlscript based approach could work.

1 REPLY 1

Jörg_Brandeis
Contributor
0 Kudos
427
  • SAP Managed Tags:

Hi Ryan,

the conversion between C32 and C22 is possible in SQLScript. Please have a look at my latest blogpst about UUID in SAP HANA, where I describe the conversion.

Regards,
Jörg