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

Printing part of string 1

Status
Not open for further replies.

ajdesigns

Technical User
Jan 26, 2001
154
0
0
GB
Hi
I have order numbers that come in as different formats ie:

123456789~DIAGNOST,
1234567891~IMMUNO,
12345678912~HAZARD
123456789,
123456789123456789,

If, as the top 3 orders the number includes a tilde and then some characters. How can I just print the number to the left of the tilde, but if the order no does not include a tilde print it all.
Basically if there is a tilde print everything except the tilde and anything after it, if there is no tilde print everything.
 
This should work:

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

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top