Solved

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

Posted on 2014-01-09
6
416 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

863 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

18 Experts available now in Live!

Get 1:1 Help Now