473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1878
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 <script> alert(8/(3-8/3)) </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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.