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

Spaces & Zeros

Status
Not open for further replies.

doublej0

Technical User
Aug 26, 2005
7
US
I have searched and have been unable to find an answer to my questions. I have two databases (neither of which I can modify) each which has an account number that corresponds to each other. The problem is one has zeros preceding the account number (i.e. 000123456789) and the other has spaces (i.e. " 123456789"). Is there a formula I can use to join these two fields together?

This is in Crystal Reports 10.

Thank you.
 
You could add the second database to a subreport, and in the subreport, create a formula {@acctno}:

replace({table.acctno}," ","0")

Then you can link the subreport to the main report by linking the field in the first to the formula in the second.

-LB
 
To avoid the slower subreport route, try posting your database type.

You may find that it's best to create a Command object (Use add command), and create the SQL yourself to handle the join.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top