To check range of data
Need your help on this problem.
Let say table name call tbl_range and 2 field call No1 and No2
I have this set of record :-
My problem, i want to check if user insert another set no No1 : 1500 No2 : 2500. So, this means that range already clash with another range. If this happened it will return 2 record (1000 - 2000) and (2001 - 3000). Can it be done and how?
you would have to do a join on the two tables where you compare that each No1, No2 fall inside of an existing No1, No2 that is not themselves.
Anyway, I already solve the problem using between. Here my code
Select No1, No2
Where (#varNo1# between NO1 and NO2)
Then in RecordCount eq 0, I proceed to insert the new record.
Really thx for your reply. Thx chazzy
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)