Results 1 to 2 of 2

Thread: BIT help

  1. #1
    Join Date
    Dec 2002
    Posts
    5

    Unanswered: BIT help

    I need to conver numbers from base 16 or 10 to 2 . For example if you now a function to convert 15 to F or 15 to 00001111.
    I need sql function if exists .

    Thanks for help.

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    select case when @i < 10 then convert(varchar(1), @i) else char(ascii('A') + @i - 10) end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •