I have a table which has a column X. X will be storing large text values in hex format. Now I want to convert hex to raw and validate the data. But when I am using the below query, I am getting only some part of text after running the query not the complete text. Actually original text is very large....
select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW(X)) as a from table name
I also tried the below query, but no use it also extracts the same
decalre @a varchar(max)
select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW(X)) as new from table name.
Kindly let me know how can i extract or see large text from sql. Sample query may be helpful.
This can be done in SQL server using built-in conversions via varbinary data type.
For MS-SQL 2008 the following stored proc will convert a hex string into a varchar(max):
To use just do something like:
or
It seems that this works better for me.