I am facing a problem in MSSQL: -
I have a table in MSSQL, which has 10 rows & 5 columns. In this table I am maintaining a numeric range in 2 columns. First one has starting number & second column has end number. All rows have unique values in these 2 columns.
For Ex.: - In first row the value in first column is 1 & in second column is 100. In another row the value in first column is 101 & in second column is 200 & so on....
Now my problem is how can we identify that a given number is coming in which range & in which row?
For ex.: - If we say number 60. Then how can we identify in MSSQL in this table the given number is coming in which range & in which row without using CURSOR??
I need to know the function or command or query or any other utility in MSSQL by which the above-mentioned task could be achieved?
Please suggest & thanks a lot in advance....
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!