Solved

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

Posted on 2014-01-09
6
415 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
  • 4
  • 2
6 Comments
 

Author Comment

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

Accepted Solution

by:
Rey Obrero 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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 119

Expert Comment

by:Rey Obrero
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now