I have a table, TblClient.
The 2 important columns are: ClientID (PK, increment) and ClientNumber.
We can add new clients, and the ClientID is auto assigned, but the ClientNumber can be chosen.
We want to make a "suggestion" for the ClientNumber, but the user can decide to input their own number and not take our suggestion.
The suggestion must be he first available ClientNumber that is bigger than 2200 (first ClientNumber is 2200).
We do this because if a user inputs a manual number, like 5000, when the last inserted one is 2500, we don't wont the next "suggestion" to be 5001, but 2501.
What is the correct way to return this number with a query?
Thank you!