Formula for Select Query

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

Guest

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.
 
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.
 
Back
Top