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

Delete Command in VFP 9.0 1

Status
Not open for further replies.

CPJ1

Programmer
Jun 8, 2017
11
US
I need to delete records from an archive table that have a date of 12/07/2020. I got the replace command to work but I am getting errors for the delete command.

set defa to e:\largedbf
use allcc_2020.nrx
delete for ccoddate with CTOD('12/07/2020') ALL;

Thanks again for your help. This should be the last thing I need help.....hopefully.
 
Hi Dan,

I hope you can help me with this. I am on another computer and using the same VFP command to replace a date in a field with another date. It's not working but worked on the other computer. I have a table with thousands of records and I am simply trying to replace the date in one of the fields. I am using the command window prompt. Here's what I have done:
set defa to f:\database
use news_ccod2014.dbf
REPLACE issuedate with CTOD('12/14/2020') FOR issuedate=CTOD('12/07/2020');

It goes to the EOF but no records are changed. Thanks in advance.
 
Maybe there are no records where issuedate=CTOD('12/07/2020') or perhaps you have the date setting to British?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Please don't ask the same question in two separate threads. It makes it much harder for other people to follow the discussion and understand the solution. You question about the REPLACE has already been answered in your other thread.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top