cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Script - rawtohex()

Former Member
0 Kudos

Hello Experts

I would like to convert a GUID to rawtohex("GUID") in a SQL Script view. I was able to do it as a calc. column in the Grapical view and as bintohex("GUID") in SQL Script, but want it in the Script view. Please provide your suggestions. Thanks.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

the below should do the job in a SQL stmt

SELECT .... cast("GUID" AS NVARCHAR(16)) AS conv_guid

FROM ...

Thanks

Jayant

Former Member
0 Kudos

Hi Jayant

I tried performing cast("GUID" AS NVARCHAR(16)), and the output value is different from output value of rawtohex("GUID")

rawtohex(A."ProdUUID") = 5244377410A412C0E10080008DF7B3A5

cast(A."ProdUUID" AS NVARCHAR(16)) AS "ProductUUID" - 35323434333737343130413431324330


Regards.