Convert hex encoded to text

  • Hi,

    How do I convert from hex encoded position of thetask and use the hex number to build the sortedlist and retrieve textual information out of it ?

    Example : 2256a4000000b400 remove the first 8 characters and use the rest .
    Example : 2256a40000001000  remove the first 8 characters and use the rest .

    Thanks,
    PSB

  • PSB - Wednesday, January 18, 2017 5:42 AM

    Hi,

    How do I convert from hex encoded position of thetask and use the hex number to build the sortedlist and retrieve textual information out of it ?

    Example : 2256a4000000b400 remove the first 8 characters and use the rest .
    Example : 2256a40000001000  remove the first 8 characters and use the rest .

    Thanks,
    PSB

    STUFF(ColName,1,8,'')

    John

  • PSB - Wednesday, January 18, 2017 5:42 AM

    Hi,

    How do I convert from hex encoded position of thetask and use the hex number to build the sortedlist and retrieve textual information out of it ?

    Example : 2256a4000000b400 remove the first 8 characters and use the rest .
    Example : 2256a40000001000  remove the first 8 characters and use the rest .

    Thanks,
    PSB

    I'm not sure what you mean by 'use the rest', but what's wrong with using a combination of RIGHT() and LEN() to strip off the first 8 characters?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • John Mitchell-245523 - Wednesday, January 18, 2017 5:48 AM

    STUFF(ColName,1,8,'')

    John

    Even better.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • select STUFF(2256700000003800,1,8,'')

    returns 00003800 and I need to convert it to textual data example "Hello"

  • DECLARE @value varchar(20) = '48656c6c6f';

    SELECT CONVERT(varchar(20), CONVERT(varbinary(20), @value, 2));

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply