Solved

How would I extract the 7 and 8th characters from a 13 charater string?

Posted on 2014-01-09
6
422 Views
Last Modified: 2014-01-09
I have a table and I need to build a query in the query designer to extract the 7th and 8th character from a 13 character string.

I know how to extract left and right but not this.

Thanks
0
Comment
Question by:PBLack
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:PBLack
ID: 39769831
It is guaranteed that the string will always be 13 characters long.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39769833
place this in one of the query column

mid([nameofField],7,2)

that should give you the 7th and 8th character
0
 

Author Comment

by:PBLack
ID: 39769839
PT1: Mid([RF_TRTID],8,2) figured it out
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Closing Comment

by:PBLack
ID: 39769841
I got it after some trial and error and it was 8th and 9th. You get the points!

Thanks
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39769842
that is not correct, that will give you the 8th and 9th character
0
 

Author Comment

by:PBLack
ID: 39769868
@ capricorn1  Yeah I made a mistake in the question. It was the 8th and 9th that I was after. Sorry about that
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question