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....