Query Data (1 Viewer)

kitty77

Registered User.
Local time
Today, 16:39
Joined
May 27, 2019
Messages
712
I have a table that has data that looks like this... I need to create a query that gives me everything before the first space

ADVA80403 Advanced
AIRC23072 Air
BETV16523 Tom

Need it to look like this.
ADVA80403
AIRC23072
BETV16523
 

plog

Banishment Pending
Local time
Today, 15:39
Joined
May 11, 2011
Messages
11,653
You would use an InStr() inside a Mid():



Mid extracts a substring from a string and InStr Identifies the spot in a string where a specific substring (or character/space) occurs.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:39
Joined
Feb 19, 2013
Messages
16,633
Don’t you mean inside a left function?
 

plog

Banishment Pending
Local time
Today, 15:39
Joined
May 11, 2011
Messages
11,653
Nope. Inside a Mid()

Left() will work in this case. But Left() really isn't needed because Mid() does everything it does and more.
 

kitty77

Registered User.
Local time
Today, 16:39
Joined
May 27, 2019
Messages
712
after over 700 posts you still don't know the basics?

left([cust], instr([cust]," ")-1)
Thanks for the example but keep you 2 cents to yourself next time. Sorry I'm not an expert like you!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:39
Joined
Feb 19, 2013
Messages
16,633
no problems, I'll not assist you in the future in case it offends
 

Users who are viewing this thread

Top Bottom