convert excel formula to sql - HELP needed

  • hello all,
    im using a simple steps with excel to convert hexadecimal number to WIEGEND no. (XXX-XXXXX).
    lately I automated my access control console which use wiegend number from all of our employee cards.

    i sync my access control database to our SQL server to a specific table which have all information i need.

    the problem is that i get the card number from the SQL server as a hexadicemal number (10digits) and i need t convert it.
    before the automated situation i made a static table in access and convert those number with this commands :

    can you explain or write down how to convert those formula to SQL  ?!

  • Hi and welcome to the forums!
    Unfortunately, you didn't post enough information for us to help you. Please read the articles linked in my signature to learn how to post sample data and expected results.
    Be aware that you'll get answers that work with MS SQL Server. If you're using something different (such as Access) the solutions might not work.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Piling on to Luis's request for information, can you share some input and output examples?
    😎

    The fastest conversion to and from hexadecimal in SQL Server is by using the CONVERT function, try that out and come back if you have any problems.

  • CONVERT(int,CONVERT(varbinary,'0x'+'C7CE',1))

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

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

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