chris01010
Programmer
Hi,
I'm trying to select a substring within a column but using another string as the starting point. This is because the position of the string in the column may change.
i.e.
ABCDEFGHIJKLMNOPMSGNO123ABCDEFGHIJKL
The refence string in the above is MSGNO so the query would return 123.
Question 1: Is this even possible?
Question 2: How do you do it? :0)
Thanks
Chris
I'm trying to select a substring within a column but using another string as the starting point. This is because the position of the string in the column may change.
i.e.
Code:
select substr(<column name>,<reference string>,3) from table;
ABCDEFGHIJKLMNOPMSGNO123ABCDEFGHIJKL
The refence string in the above is MSGNO so the query would return 123.
Question 1: Is this even possible?
Question 2: How do you do it? :0)
Thanks
Chris