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.
GUID_C32 = 0050569C5B6F1EE88AA45A98B8682B89
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.