question inserting nchar(1) from a hex value

  • I have a hex value, 0x5E and I need to insert it into the field type nchar(1)

    how would I do that?

  • It depends.

    If you want to store the integer value converted to character then you can't, since the value '94' has two character.

    But if you want to store the ASCII character for value=94 (^) then you could use

    SELECT CHAR(ASCII(0x5e))



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

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