> Hi,
> The business scenaraio is i have table called rules in that rules
[quoted text clipped - 6 lines]
> i need to find that my value lies in that range .
> any one help me out thanks in advance.
Not sure exactly what you are trying to do.
I am guessing you have an ip address that you want to use in a query and see if it is between some range of ip numbers.
Instead of using a single field that is varchar, you should use two fields defined as unsigned longs.
If you store the ip address data as unsigned longs in the database, it will be simple enough then to compare it using something like
where ipnum >= iplow and ipnum <= iphigh
=====================================================
THIS IS MY SIGNATURE. There are many like it, but this one is mine.
Roedy Green - 10 Jan 2008 05:33 GMT
>where ipnum >= iplow and ipnum <= iphigh
in Java I like to write that as:
if ( iplow <= ipnum && ipnum <= iphigh )
because it more closely mimics the mathematical notation:
iplow <= ipnum <= iphigh

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com