Here is a SQL function that will convert a hex string:
BEGIN
DECLARE @hexstring AS VARCHAR(8000)
SET @hexstring = '4368726973204Ce4747461'
DECLARE @strlen AS INT;
SET @strlen = Len(@hexstring)
DECLARE @currpos AS INT
SET @currpos = 1
DECLARE @hexpos AS VARCHAR(16)
SET @hexpos = '0123456789abcdef'
DECLARE @result AS VARCHAR(8000)
SET @result = ''
DECLARE @ch AS INT
WHILE @currpos < @strlen
BEGIN
SET @ch = CONVERT( INT, 16 * (CHARINDEX( SUBSTRING( @hexstring, @currpos, 1), @hexpos, 1) - 1)
+ (CHARINDEX(SUBSTRING(@hexstring, @currpos+1, 1), @hexpos, 1) - 1))
SET @result = @result + CASE WHEN @ch >= 32 AND @ch < 128 THEN CHAR(@ch) ELSE '?' END
SET @currpos = @currpos + 2
END
SELECT @result
END
I added a short hex string to show the function works.
Your hex string didn't convert so well. It may be because of the nulls in it, so I added the @char >= 32
part to strip out control codes (only convert printable ASCII characters, otherwise insert a ?
) and you get a string that looks like the one you are after.