Query criteria to see middle 4 characters/12 char field

  • Thread starter Thread starter Ray B
  • Start date Start date
R

Ray B

In a select query I have a text field that is 12
characters long that
follows the pattern of 3 numbers, a dash, 4 numbers, a
dash, 3 numbers.
Example is 123-4567-001. I want the query to remove the
first four and the
last four characters so in the example I would only see
4567. I need this
as the middle four characters are the chronology on how
projects are entered
into the system which I need to synch with another
database. What critieria
do I need to apply or how would I do this. Thank you.
 
In a select query I have a text field that is 12
characters long that
follows the pattern of 3 numbers, a dash, 4 numbers, a
dash, 3 numbers.
Example is 123-4567-001. I want the query to remove the
first four and the
last four characters so in the example I would only see
4567. I need this
as the middle four characters are the chronology on how
projects are entered
into the system which I need to synch with another
database. What critieria
do I need to apply or how would I do this. Thank you.

Add a new column to the query.
MiddleFour:Mid([Fieldname],5,4)
 
Back
Top