Return the values up to a certain character

ECEK

Registered User.
Local time
Today, 08:26
Joined
Dec 19, 2012
Messages
717
I have a list of codes and I just want to extract everything up to the "/" character. I can do this in excel but cant figure out the query formula in Access!!

4256782/677
232415526728882/677
5634252773/6772

Result =

4256782
232415526728882
5634252773

many thanks you beautiful people !
 
Well, you could just use excel --if that is an option and your go to product.
You could use InStr and Mid as plog says, and/or you could use the Split() function
 
Did it myself:

Left([Field1],InStrRev([Field1],"/")-1)

....the "Well, you could just use excel" wasn't helpful!
 
If you want the numeric value to the left of alpha chars in a string, use Val().
Code:
Val([Field1])
 

Users who are viewing this thread

Back
Top Bottom