5 pts.
 Extract part of a field in crystal reports
I need to be able to extract part of a field to use in a crystal report. For example: my account # is any number of digits with a - followed by another number. I just want the numbers in front of the -. If the account = 1234-1 i want it to return 1234. if the accoutn = 123-23 i want 123. How can i do that?

Software/Hardware used:
ASKED: August 20, 2010  4:41 PM
UPDATED: June 26, 2012  5:59 PM

Answer Wiki:
You could use a combination of the LEFT and INSTR functions. Something like this: <pre><b>Left</b>({your_field},<b>InStr</b>({your_field},"-")-1)</pre>
Last Wiki Answer Submitted:  June 27, 2012  6:01 am  by  TomLiotta   107,735 pts.
All Answer Wiki Contributors:  TomLiotta   107,735 pts. , carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _