|
Re: Identiyfing firsts and last occurance of certain characters in a string-URGENT [message #21947 is a reply to message #21946] |
Thu, 12 September 2002 08:34 |
Mike T
Messages: 32 Registered: August 2002
|
Member |
|
|
Try this:
SUBSTR(column,(INSTR(column,'**',1,1)+2),(INSTR(column,'**',1,2)-(INSTR(column,'**',1,1)+2)))
Use the INSTR function to find the start position and length values for your SUBSTR.
To find the starting point for your SUBSTR, you will find the position of the first occurence of '**' and add two to that (to skip the '**'. Say the '**' starts in position 3, you want the data that starts at position 5...add 2).
Then find the position of the second occurence of '**' and subtract your starting point (the position of the 1st occurence + 2). That should give you the length of your SUBSTR.
Untested and maybe too much code, but should work...
|
|
|
|