Parse Expression

  • Thread starter Thread starter Nichole
  • Start date Start date
N

Nichole

I have a field called TaskDesc that contains a vendor
name. The vendor name is the first text in the TaskDesc
field. I would like to parse the field to return only the
vendor name assigned to that task. Here is an example of
the values in the TaskDesc field.

VendorNm: description of the task

All vendor names are followed by a colon and a space. The
vendor names have varying length. I sense that a mid or
left function should be used, but cannot figure out how to
make it cut off at the colon.
 
I have a field called TaskDesc that contains a vendor
name. The vendor name is the first text in the TaskDesc
field. I would like to parse the field to return only the
vendor name assigned to that task. Here is an example of
the values in the TaskDesc field.

VendorNm: description of the task

All vendor names are followed by a colon and a space. The
vendor names have varying length. I sense that a mid or
left function should be used, but cannot figure out how to
make it cut off at the colon.

VendorName:Left([TaskDesc],InStr([TaskDesc],";" )-1)
 
Nichole,

Try the expression:

Left([TaskDesc],Instr(1,[TaskDesc],":")-1)

HTH,
Nikos
 
Worked exactly like I needed. Thank you very much.
-----Original Message-----
I have a field called TaskDesc that contains a vendor
name. The vendor name is the first text in the TaskDesc
field. I would like to parse the field to return only the
vendor name assigned to that task. Here is an example of
the values in the TaskDesc field.

VendorNm: description of the task

All vendor names are followed by a colon and a space. The
vendor names have varying length. I sense that a mid or
left function should be used, but cannot figure out how to
make it cut off at the colon.

VendorName:Left([TaskDesc],InStr([TaskDesc],";" )-1)

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Worked exactly like I needed. Thank you very much.
-----Original Message-----
Nichole,

Try the expression:

Left([TaskDesc],Instr(1,[TaskDesc],":")-1)

HTH,
Nikos

I have a field called TaskDesc that contains a vendor
name. The vendor name is the first text in the TaskDesc
field. I would like to parse the field to return only the
vendor name assigned to that task. Here is an example of
the values in the TaskDesc field.

VendorNm: description of the task

All vendor names are followed by a colon and a space. The
vendor names have varying length. I sense that a mid or
left function should be used, but cannot figure out how to
make it cut off at the colon.


.
 
Back
Top