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

Derived field for Zip Code Formatting

Status
Not open for further replies.

abowling

Technical User
Apr 27, 2005
33
0
0
US
I have a report that has zipcodes listed as follows:

75201
75201-1111
75201-1234
752011234
752011111

I need for all to be consistent(without dashes) as follows:

752010000
752011111
752011234
752011234
752011111

Any help would be greatly appreciated.
 
Do a Derived field and use the Replace function.

THE SYNTAX WILL BE SPECIFIC TO YOU DATABASE BRAND:

For Oracle try this:
REPLACE(zipcodefieldname,'-','')



NOTE:zipcodefieldname needs to be the real database name.

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Thank you, I was making it more difficult than it needed to be!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top