[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

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

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
PBLack
Asked:
PBLack
  • 4
  • 2
1 Solution
 
PBLackAuthor Commented:
It is guaranteed that the string will always be 13 characters long.
0
 
Rey Obrero (Capricorn1)Commented:
place this in one of the query column

mid([nameofField],7,2)

that should give you the 7th and 8th character
0
 
PBLackAuthor Commented:
PT1: Mid([RF_TRTID],8,2) figured it out
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
PBLackAuthor Commented:
I got it after some trial and error and it was 8th and 9th. You get the points!

Thanks
0
 
Rey Obrero (Capricorn1)Commented:
that is not correct, that will give you the 8th and 9th character
0
 
PBLackAuthor Commented:
@ 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now