Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting text out of middle of a field 1

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
Hi

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.

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

Borislav Borissov
VFP9 SP2, SQL Server
 
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.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Thanks guys this worked for me


Select SUBSTRING([Productpack].[Notes],28,7) AS WONUmber
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top