Hello All,
I have 2 tables
1st table is having data like Name, Min and Max range
A 100 200
B 300 400
2nd table we have data like Name, Number, Remarks
I want was trying to get the next available number in the input box from range suppose if the range is 100-200
and we have data for numbers like 102,103,105 so the next available number is 104 then 106 and it should go till 200.
If I select B from drop down, it will take number 300, 301.
Hi,
one way to do, select the column is ascending order and get the first value.
On a variable store that number plus 1.
Them loop thru the records and if the number of the loop is equal to the variable add again 1 to the variable.
When you get where they are different and the value from the record is greater than the value in the variable you found the next available number.
Hope that I could explain clearly, best regards.