I have a very big concern and I have not been able to find a solution yet, my concern is to know if there is a way to search for a maximum number before reaching another number which is greater but I gave it that numbering to limit access.
That is, I have my sql table with some codes where I put some items and partly I put an item with the numbering of the last item that can be generated (column width: 2 digits), let's say that from 1 to 12 I put some items and I have the item 99 is there a way to ignore item 99 so that it only tells me that the last number used is 12 and that number is returned to me? (I don't want to delete the 99 from the table)
Of course you can, what you should do is exclude the record with a filter
where
, to get the maximum, it would be something like: