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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left Trim Function - Update a field based on a common field entry? 1

Status
Not open for further replies.

piovesan

Technical User
Joined
Jan 23, 2002
Messages
159
Location
CA
Hi all;

I am familiar with the Left and Right functions, but I am wondering if there is a way to trim records based on a common text entry, rather than the number of chracters?? For example, I have a field (Field 1) that has records like this:
07/02/2008 02:58 PM 238,258 parkid3405_1.jpg
07/02/2008 03:03 PM 199,589 parkid33_4.jpg
07/02/2008 03:52 PM 48,630 parkid6_10.jpg
and is a text field of 255 characters!

I have added two more fields to my table, Clip 1 is a text field and I would like to update that field to have just the parkid3495_1, parkid33_4, parkid6_10 etc information. And field Clip 2 I want to have just 3405, 33, 6, etc as an integer field.

How can I do this??
Thanks!
 
for clip1:
Code:
mid(field1,instr(field1,"parkid"),len(field1)-4)

for clip2:
Code:
val(mid(field1,instr(field1,"parkid")+6,len(field1)-4))
 
Thank you ever so much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top