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

Problem with a database 1

Status
Not open for further replies.

PremiumL

MIS
Nov 3, 2004
10
US
I have a database called mail.dbf. I need to delete zip codes that end in an odd number (ex: 1,3,5,7 & 9). How do I only keep zip codes that end in an Even number. Keep in mind that the zip code field is called zip and is only 5 characters long.

Thanks for the help,

Jarrett
 
Dave,

I did that and I got an error that says too few arguments. What should I do?
 
Woops, my bad. The MOD() function requires a second value.
This statement:
Code:
DELETE ALL FOR MOD(VAL(RIGHT(zip, 1))) > 0
should instead read:
Code:
DELETE ALL FOR MOD(VAL(RIGHT(zip, 1))[COLOR=red] ,2[/color]) > 0
As a side note, you are working with a backup of the table, aren't you? [wink]

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Jarrett,
not so scientific as Dave, simply as you say
dele all for right(zip,1) $ "13579"
Tesar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top