I have a scenario where I need to find the next sequence of numbers in a character field. I found the starting position by using the LOCATE command but need to find the next sequence in the same row if anything.
Issue Number : 01 Card Number 1234 5678 9012 3456.
I found the starting position of '0' but need to find the position of digit '1' after card number.
Suppose the start position of '0' is 16 means then the next number start position should be 31 as per the example above. I used MIN(LOCATE) and to find maximum value used MAX(LOCATE). But it is not giving correctly what i required in this case.
I need this in QMQUERY or SQL in DB2.
Thanks in advance.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!