String functions

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

Guest

Can anybody help me with a little problem i'm having with string functions please?
I'm writing a query with which i want to create an expression to get part of a string. The string is a British postcode in the format AA0_0AA or AA00_0AA (where _ is a space). I want to be able to get the characters to the left of the space in both formats without getting the space and by only writing on eexpression that applies to both. Any help would be much appreciated.
Thanks
 
Left([InputString], InStr([InputString], "_") - 1)

where the underscore is a space character.

--
HTH
Van T. Dinh
MVP (Access)



Grassfinch said:
Can anybody help me with a little problem i'm having with string functions please?
I'm writing a query with which i want to create an expression to get part
of a string. The string is a British postcode in the format AA0_0AA or
AA00_0AA (where _ is a space). I want to be able to get the characters to
the left of the space in both formats without getting the space and by only
writing on eexpression that applies to both. Any help would be much
appreciated.
 

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

Back
Top