Hallo,
I'm trying to create a query which returns me the next higher number:
My table: tblPersons
	
	
	
		
My query:
	
	
	
		
Input:
[InputBalance] = 500
Result: John
[InputBalance] = 1234
Result: Alice
[InputBalance] = 9999
Result: EMPTY
Result should be Bob
Can someone tell me please if it's possible to combine this logic into one query?
Thanks
 I'm trying to create a query which returns me the next higher number:
My table: tblPersons
		Code:
	
	
	ID, Name, balance,
10  John   1000
11  Alice   2000
12  Bob    3000
	My query:
		Code:
	
	
	SELECT TOP 1 name FROM tblPersons WHERE( (balance)>([InputBalance])) ORDER BY balance ASC
	Input:
[InputBalance] = 500
Result: John
[InputBalance] = 1234
Result: Alice
[InputBalance] = 9999
Result: EMPTY
Result should be Bob
Can someone tell me please if it's possible to combine this logic into one query?
Thanks