parse substring in string

dai_lo

Registered User.
Local time
Yesterday, 16:53
Joined
Jan 10, 2008
Messages
30
Hi,

I would like to extract 13743 from a string

CNG_AWE SR TRS PAY Bond 7.875 01Mar11 USD - 13Oct05 to 13Oct09|||13-Oct-09|CNG_AWE|13743

a column in a table has a lot of strings like the one above, but they have different length, such as the one below

NAB SUB TRS PAY Bond 8.60 19May10 USD - 31Oct05 to 31Oct09|||31-Oct-09|NAB|1424

I need to extract any numeric characters after the last | (separator) in a string.

please advise.

Alice
 
Use InstrRev to find the position of the | then as you can use Len to find the length of the string Len - the other will give you the legth to use in a Right operation to get the numbers and the Instrrev position would also allow you to get all except the numbers if used with Left

Brian
 

Users who are viewing this thread

Back
Top Bottom