473,389 Members | 1,082 Online

# Best way to compare Binary and Int values

Hello
I have a situation like this, I have 2 colns in an SQLServer table
which are set to following SQLServer data types
sTime->Binary (length=8), and tTime -> Int (length=4)

I need to compare the 2 values and was looking for the best way to do
this. Any hints are greatly appreciated.
thanks
Sunit
Nov 16 '05 #1
1 1876
Sunit,

What is the algorithm for comparison here? Given that the sTime value
has 8 more bytes in it (resulting in a vastly larger value set than the
integer with four bytes), you are going to have values in the 8 byte space
that can't be represented in the 4 byte space.

What are you trying to do?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sunit Joshi" <sj****@ingr.com> wrote in message
news:8f**************************@posting.google.c om...
Hello
I have a situation like this, I have 2 colns in an SQLServer table
which are set to following SQLServer data types
sTime->Binary (length=8), and tTime -> Int (length=4)

I need to compare the 2 values and was looking for the best way to do
this. Any hints are greatly appreciated.
thanks
Sunit

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

### Similar topics

 1 by: Davy | last post by: Hello all, I have two groups of digit data. The data in it may be repeated. Some thing like {5 59 74 17 5 1} and {3 8 25 4}. And real group is larger. Each may own thousands of data. I want to... 5 by: sjoshi | last post by: I need to compare and update a Binary(8) coln with values from an Int(4) coln. Could someone please explain how to do this..?? thanks Sunit 3 by: Benny Ng | last post by: Dear all, The following is the source. The password is encrypted and saved into the Binary in SQL2K. Now I want to create a new page to compare the existed password and the password that in the... 6 by: yong321 | last post by: With this script I hope to get 24, but I get 23.99999999999999 in IE 6.0.2800 and Firefox 1.5.0.4. alert(6/(1-3/4)) returns 24 as expected. I see a... 17 by: Mark A | last post by: DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are... 0 by: Michael Jenck | last post by: Hi All, I have been playing with the codedom and can't get it to output for option compare Binary with a CodeCompileUnit. I have searched the web and Don't now if it's possible. If it's not... 50 by: titan nyquist | last post by: I wish to compare two structs via == but it does not compile. I can overload and create my own == but am I missing something that c# already has implemented? ~titan 10 by: agendum97 | last post by: I have three values: UInt64 a, b, c, d; I need to determine if: (a*b) <=(c*d). Naturally, just doing the multiplication and comparing would tell me the result. However, the values could... 6 by: aznimah | last post by: hi, i'm work on image comparison. i'm using the similarity measurement which i need to: 1) convert the image into the binary form since the algorithm that i've use works with binary data for the... 0 by: taylorcarr | last post by: A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,... 0 by: Charles Arthur | last post by: How do i turn on java script on a villaon, callus and itel keypad mobile phone 0 by: emmanuelkatto | last post by: Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel 1 by: nemocccc | last post by: hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions? 1 by: Sonnysonu | last post by: This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to... 0 by: marktang | last post by: ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,... 0 by: Oralloy | last post by: Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,... 0 by: jinu1996 | last post by: In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven... 0 by: Hystou | last post by: Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.