Shortening a field in Access Query

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

Guest

Can anyone help me?

I have a field which has a reference in which varies in length.
examples of the data in this field are:

07/1567/2/1
07/1234/12/1
07/0234/1/074
07/0324/12/1A

I want to limit this field in a different field in a query to read the
referencesas below:

07/1567/2
07/1234/12
07/0234/1
07/0324/12

Does anyone know how I can do it or if I can do it?

Cheers
 
Sure, just in the query builder type in:


NData: Left([tdata],InStrRev([tdata],"/")-1)

The above collum will have the name "ndata", and the collum we are pull the
data from is tdata

The above assumes you will ALWAYS have 4 "/" in the text.
 

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