Formula for Select Query

A

AccessHelp

Hello all,

I am trying to write an expression (formula) for a Select Query to extract
the first group of string. I have tried the functions "MID", "LEFT",
"RIGHT", etc, and they don't seem to work. Below is a sample of data:

AA American Airline
AA-1 American Airline 1
DEL Delta Airline
DEL-1 Delta Airline

I am trying to extract the first group (AA, AA-1, DEL, DEL-1) information.
The first group of info does not always have a set of characters (e.g. 4
characters). However, they always end with a space.

Please help.

Thanks.
 
K

kingston via AccessMonster.com

Try this:

Mid(String,1,Instr(String," ")-1)

Hello all,

I am trying to write an expression (formula) for a Select Query to extract
the first group of string. I have tried the functions "MID", "LEFT",
"RIGHT", etc, and they don't seem to work. Below is a sample of data:

AA American Airline
AA-1 American Airline 1
DEL Delta Airline
DEL-1 Delta Airline

I am trying to extract the first group (AA, AA-1, DEL, DEL-1) information.
The first group of info does not always have a set of characters (e.g. 4
characters). However, they always end with a space.

Please help.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top