Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Comparing hexadecimal values

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-07-06 : 11:50:26
Carl writes "I'd like to store 32-bit addresses in SQL Server and later be able to compare them in a stored procedure. For example, I'd like to return all rows in a certain range:
- greater than 0x00400000 but less than 0xffffffff
- all less than some MAX() value.

How can I get the values to behave as unsigned types? Which data type should I use? Should I write a function to do this?

Sorry if this question seems naiive, I'm a total newbie.

thanks,
-carl"

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2004-07-06 : 12:03:37
binary(4) will order 0x00000000 lowest, 0xffffffff highest with 0x7fffffff in the middle.
Go to Top of Page
   

- Advertisement -