Extract Specific Data

C

CJ

Hi Groupies

The data in my Job Number field looks like this:
DC-2010-1-63 - City Hazard
AB-2010-5-960 - Shop

How can I extract everything up to the 4th dash so that I am left with:
DC-2010-1-63
AB-2010-5-960

Thanks in advance.
 
J

Jerry Whittle

Assuming that the first space always occurs just before the 4th dash,
something like this in a query with the proper field name:

TheJN: Left([Job Number],Instr([Job Number], " ")-1)
 
C

CJ

Thanks Marsh!

I have never used InstrRev or InStr before. Would have taken me all summer!
 

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