Best way to compare Binary and Int values

  • Thread starter Thread starter Sunit Joshi
  • Start date Start date
S

Sunit Joshi

Hello All
I have an SQLServer table with 2 colns that I need to compare. The
colns and their sql server datatypes are:

sTStamp -> Binary (length 8)
dTStamp -> int (length 4)

Another appliccation, when they store the sTStamp it's putting it in
the most significant byte for whatever reason. So I guess the value of
sTStamp would have to be shifted.

I need to compare the sTStamp and dTStamp values, either SQLServer way
(SP, UDF) or in .NET. So I wanted to get suggestions on the best way
to do this.

thanks
Sunit
 
You are either going to have to convert both to a larger integer or look at
both as a binary array. I am not sure which is better, overall. From what you
have stated, I would consider staying in the SQL Server realm.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top