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 biv343 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
May 17, 2005
57
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?
 
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