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!

Selecting specific data within a string 1

Status
Not open for further replies.

JulesDBQ

Programmer
Apr 17, 2003
22
US
I would like to create a formula that selects any text that displays to the left of a static symbol within a string. For example:

manpc01|%fakjfisufasdfsdf787fs87f

In this case, I would just want to select manpc01. So, I would want to select any text left of the |% symbols. I then want to take the results of this formula (manpc01, etc) and group my report by this value. Does this seem like a possiblity?


Thanks for any help on this. I really appreciate it. [smile]
 
Try:

left({table.string},instr({table.string},"|%")-1)

You should be able to group on this.

-LB
 
Thank you so much!! That did exactly what I wanted. [smile]
 
Another means is:

split({table.field},"|")[1]

The split and join functions are worth understanding for cheating parsing and for array functions.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top