Hex to Dec

G

Guest

Can anybody tell me how to use the below for converting hex to dec? I'm
trying to use it in FP200 .asp pages that uses a form to send to a database
on a SQL server. Where do I put it and do I need to edit it to reflect form
field names or database fields names? I've tried various ways and can't get
it to work. Any input would be appreciated.


SELECT 'Int -> Hex'

SELECT CONVERT(VARBINARY(8), 16777215)

SELECT 'Hex -> Int'

SELECT CONVERT(INT, 0xFFFFFF)



I apologize if this question appears twice.
 
J

Jon Spivey

Hi,
You need sub your field numbers for the numbers, eg
SELECT CONVERT(VARBINARY(8), YourIntegerField) AS HexValue
SELECT CONVERT(INT, YourHexField) AS IntegerValue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top