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

suppress part of string

Status
Not open for further replies.

sandora

Technical User
Joined
May 17, 2005
Messages
57
Location
US
V11 - AccessDB - The value returning is a variable length string, it is, for instance 4444-01 or 44444*01. I want to suppress everything from and including the - or * to the right. Any suggestions?
 
Will it always be an asterisk or a dash?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
yes, some instances are dashes and some are asterisks.
 
left({yourfield},maximum(instr("*",{YourField}),Instr("-",{YourField}))-1)

the above should work provided that there is never both an asterisk and a dash.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top