Skip to main content

Search number (1st table) in range (2nd table) and give the corresponding value

Hi
Please help
 
I have 2 tables
1st table contains value (e.g. 2, 8, 13, 17, 55, 104,)
2nd table contains 3 columns. 1st Column Start range, 2nd column End range, 3rd Column value)
I want to build a query, where second column will be added in 1st Table.....which will contain criteria and will query the value in 1st table and check the value betwene Start and End range of 2nd table...if the value is between the start and end range...then it will give the corresponding value in 3rd column of 2nd table.
E.g.
1st Table
Value
2
8
13
17
55
104
276
2nd Table
Start End Value
4 10  A
12 18 B
20 30 C
52 87 D
90 124 E
 
Result should be:
1st Table
Value Result
2 Not found
8 A
13 B
17 B
55 D
104 E
276 not found
 
 

The website encountered an unexpected error. Try again later.