I've been looking at this this for the last hour and just can't seem to find a way to do it, I'm sure its pretty simple but my google and reading skills have failed me.
All I need to do is to find ascending and descending numerical patterns in a field.
Like in this pseudo-SQL Code:
select * where col = '123456' or '23456' or '7654' or '987654321'
Most of the pattern methods using LIKE seem to be around placement of characters/numbers rather than the specific ordering,
I've started trying to create a query than takes the first character and compares it to the next one but this seems really ineffective and inefficient as it would need to take each field in the column run the query and return it if it matches.
I've managed to find a way to get it if its a repeated character but not if its an increase or decrease.
Any help would be greatly appreciated.
4141243, 4290577, 98765432, 78635389, 4141243, 22222, 4290046, 55555555, 4141243, 6789, 77777, 45678, 4294461, 55555, 4141243, 5555so the return from this would be 6789 and 98765432, there is no length criteria (other than the potential Maximum of 12 characters but the number can be between 1-12 characters long) edit -sorry thats a bit of an eyesore to read