Split a value of a field based on "_"

Sniper-BoOyA-

Registered User.
Local time
Today, 05:26
Joined
Jun 15, 2010
Messages
204
Hi,

I have got a field with values like "12345_678910".
I know in a query i could use either Left() or Right() and set a the length of the string to determine which characters i would like to 'filter'.

However, the number of characters in front of the "_" is variable.

I am wondering if there is a way to filter all characters fron the left of the underscore without having to set a fixed amount of characters.

Thanks a lot.
 
Left(YourFieldName,Instr(YourFieldName,"_")-1) returns 12345

Or Mid(YourFieldName,Instr(YourFieldName,"_")+1) returns 678910
 
Yes, that is.

Cheers!
 

Users who are viewing this thread

Back
Top Bottom