I have a fun problem,
I have data stored in SQL Server 2008
VARDATA column as Hex.
I need to see what this translated to string is.
I have tried
CONVERT(VarChar(MAX), VARDATA, 2) and it returns a Varchar value of the hex exactly the same as it is in the
If I put the value that is in my
VARDATA into an online converter I get the exact value I expect back.
Any help would be appreciated.
Example of the Hex is
It should work out to.
EDIT: some additional information. This data starts out in ORACLE it is in a
RAW type column.
We bring the data to SQL Server 2008 via Linked Servers using the below open query.
Select TABNAME, VARKEY, DATALN, VARDATA from sapsr3.KAPOL
When I use the suggested function on this SQL Server 2008 table below.
Select CONVERT(NVARCHAR(MAX),VARDATA) from KAPOL
I get these symbols:
If I do the conversion of HEX in Oracle first and then try and bring it over I get an empty column.
Select TABNAME, VARKEY, DATALN, utl_raw.cast_to_nvarchar2(hextoraw(VARDATA)) VARDATA from sapsr3.KAPOL
Lastly, in the first instance with no conversion in the oracle table the data type for the column
When I try the conversion in Oracle first is