Support 805.461.7300
Our Technology. Your Success.

Insert a comma into a number when the number is larger than 999

Description

This command is used to place commas into a field when the number in the field is greater than 999.

The command will make the following types of changes:

It will change 1000 to 1,000

100000 to 100,000

10000000 to 10,000,000

The Command

Replace all fieldname with IIF(LEN(ALLT(fieldname))>6 ,LEFT(ALLT(fieldname),LEN(ALLT(fieldname))-6)+","+SUBSTR(ALLT(fieldname),LEN(ALLT(fieldname))-5),ALLT(fieldname))
Replace all fieldname with IIF(LEN(ALLT(fieldname))>3,LEFT(ALLT(fieldname),LEN(ALLT(fieldname))-3)+","+SUBSTR(ALLT(fieldname),LEN(ALLT(fieldname))-2),ALLT(fieldname))

In this command, FIELDNAME represents the field that contains the number. Change the word fieldname to the name of the field in your database that you want this command applied to. Before running this command, make sure your field is wide enough to hold at least two extra characters. Pull down the Edit menu to Fields to find out.

« Back to Commands

I got a virus and had to have my computer practically rebuilt resulting in losing my custom settings, etc. I just finished an online remote session with Geoff. He was amazingly helpful, patient and upbeat. He spent over 1½ hours with me. Not only did he help me with what I asked him for, he gave me a lot of additional information making my mailing process easier. I've been using AccuZIP for years now and have never taken the time to commend the company for its excellent customer service. I have had good experiences with all of your techs and will absolutely recommend you to anyone I know who needs this kind of software. Thank you for such a user-friendly, customer friendly program!
S.F., Kansas City, MO