Solved

Remove spaces from postal code

Posted on 2014-03-03
3
338 Views
Last Modified: 2014-03-03
How can I remove the spaces from the postal code as per the following?

These are Canadian post codes
A2B 4Y3
A2B4Y3

In the database a user can add the data both ways but on the Crystal report I want to show with no spaces.

The field name is: BVPOSTALCODE and it is a pervasive database
0
Comment
Question by:Gerhardpet
3 Comments
 
LVL 28

Assisted Solution

by:Bill Bach
Bill Bach earned 250 total points
ID: 39901461
PSQL supports the REPLACE() function, which is used like this:
    SELECT REPLACE(BVPOSTALCODE,' ','') FROM tablename
0
 
LVL 22

Accepted Solution

by:
Ido Millet earned 250 total points
ID: 39901535
Or if you wish to use a Crystal formula to do the cleanup,
Replace({BVPOSTALCODE}, " ", "")
0
 
LVL 1

Author Closing Comment

by:Gerhardpet
ID: 39901580
I needed the Crystal formula and both work.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now