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

Nesting Function Help!!!

Status
Not open for further replies.

mrowe

Technical User
Jun 20, 2002
2
GB
Hi,

I have a field in a report that has 3 strings of text separated by a space, but not fixed length.

i.e CTAX100 CEDRT00001 CRT948
CTX093 CTEX30344 CWERT4DD

My mission is to split theses into 3 collums.

I've tried using SubString and Pos to pull apart but with no luck.

I could do with some help on nesting or another solution if possible.

Thanks in advance
Matt
 
If I have not missed something, it would be like this:

<COL1> = Left(<COL>, Pos(<COL>, &quot; &quot;) - 1)

<COL2> = Left(SubStr(<COL>, Length(<COL1>&&quot; &quot;)+1, 1000), Pos(SubStr(<COL>, Length(<COL1>&&quot; &quot;)+1, 1000), &quot; &quot;) - 1)

<COL3> = Left(SubStr(<COL>, Length(<COL1>&&quot; &quot;&<COL2>&&quot; &quot;)+1, 1000), Pos(SubStr(<COL>, Length(<COL1>&&quot; &quot;&<COL2>&&quot; &quot;)+1, 1000), &quot; &quot;) - 1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top