Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Getting text out of middle of a field

Getting text out of middle of a field

Getting text out of middle of a field


I am trying to get the text out of the middle of a notes field.

Field is called notes in a table called productpack. I am doing this in a view. I have been trying something like below in the column section of the view but all it returns is what I have typed below

'Select SUBSTRING.[Productpack.Notes,28,6)'

The test example I am trying to get out is 218109 from the row below.

Pack created by Works Order 218109 on 01/02/2017

Could someone advise how to do this please in the View.


RE: Getting text out of middle of a field


Select SUBSTRING([Productpack].[Notes],28,6) AS Something
FROM [Productpack] 

Borislav Borissov
VFP9 SP2, SQL Server

RE: Getting text out of middle of a field

Select SUBSTRING('Pack created by Works Order 218109 on 01/02/2017',29,6) returns 218109.

I expect the complexity would be if your data is all consistent.

Hook'D on Access
MS Access MVP 2001-2016

RE: Getting text out of middle of a field

Thanks guys this worked for me

Select SUBSTRING([Productpack].[Notes],28,7) AS WONUmber

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close