Extract partial string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have field in my database that contains the following entry:
Q687 : WORKER BUY / R399 : LEGAL MANAGEMENT / H112 : RDR- TATICAL SERVICE

I am only interested in 'TATICAL SERVICE'. How can I extract that piece of
the string?

Thanks in advance!
PJ
 
Found it!

The trick was to use InStrRev instead of InStr.
DeptParent:Right([dept parent],Len([dept parent])-InStrRev([dept parent],":"))

PJ
 
I have field in my database that contains the following entry:
Q687 : WORKER BUY / R399 : LEGAL MANAGEMENT / H112 : RDR- TATICAL SERVICE

I am only interested in 'TATICAL SERVICE'. How can I extract that piece of
the string?

Thanks in advance!
PJ

What do YOU mean by extract "TATICAL SERVICE?

Do you mean you want to remove that phrase from the string and retain
everything preceding it?
EXP: left([FieldName],Len([FieldName])-15)

Do you mean you wish to retain everything after RDP-, (and that
sometimes the next words are NOT "TATICAL SERVICE")?

EXP:Mid([FieldName],InStr([FieldName],"RDR-")+5)
 
Back
Top