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

Split a text field into two separate fields

Status
Not open for further replies.

mrussell71

IS-IT--Management
Nov 28, 2001
20
0
0
US
I have a text field (Description) that I want to split into two different fields (Part_Def) and (Footnote). The Description field has a text string at the beginning, i.e. "[part definition]". After the closing bracket there is another string that I want to parse out into a separate field.

How should I set up a query to parse this information into two fields? I want to break the original string at the " ] ". Everything to the left placed in the Part_Def field, including the " ] " And everything to the right in the Footnote field.

Thanks for the help.
 
Never Mind, I figured it out.

part_def: Left([DESCRIPTION],InStr([DESCRIPTION],"]"))

and then,

TempDesc: Right([DESCRIPTION],Len([DESCRIPTION])-InStr([DESCRIPTION],"]"))
 
If you don't want the brackets included....

col1: Left([Description],InStr(1,[Description],"]")-1)

col2: Mid([Description],InStr([Description],"]")+1,Len([Description])) J. Jones
jjones@cybrtyme.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top