Is it possible to SELECT deleted records?

Forum for DBF Commander discussing.

Is it possible to SELECT deleted records?

Postby somethingsimil » Fri Oct 24, 2014 5:09 pm

I have a table that I would like to select the deleted records into another table. Is this possible? It seems, for example, that when I load the DBF file it shows deleted rows, but if I do select * from that table it does not (which is correct behavior). ...but now I'd like to extract the deleted records for analysis. Is that possible?
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm

Re: Is it possible to SELECT deleted records?

Postby Admin » Fri Oct 24, 2014 10:22 pm

We were thinking about such feature to be implemented. It will be added in one of the next releases, if there would be requests from other users. For now, you can do as follows:
1. If the table doesn't have an unique ID - create it: add Integer field and fill it with RECNO() function, for instance.
2. SELECT all records to another table - you'll get all non-deleted records.
3. Restore all deleted records in the 1st table ('Edit -> Recall All'), then link these two tables by the ID field and select all records that presents in the 1st table, but missing in the 2nd one. You'll get deleted records from the 1st table.
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 116
Joined: Wed Apr 21, 2010 7:27 pm

Re: Is it possible to SELECT deleted records?

Postby somethingsimil » Fri Oct 24, 2014 10:37 pm

Thanks, this is what I came up with as well.
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm

Re: Is it possible to SELECT deleted records?

Postby mkadmin » Wed Nov 30, 2016 5:10 pm

We are now using DBF Commander in order to sync records from a foxpro application to a Web App using MS SQL server. It is critical to be able to identify deleted records in FoxPro db. Comparison method suggested above is sluggish and inelegant for huge files.
We would very much appreciate if you could implement this future the soonest possible. Please make it possible to happen through the command line too.

Thanks a lot,
Mike Kokolakis
mkadmin
 
Posts: 5
Joined: Thu Mar 12, 2015 5:29 pm

Re: Is it possible to SELECT deleted records?

Postby Admin » Wed Nov 30, 2016 10:45 pm

Hello Mike,
the feature has been added in the latest release. Please download the update here: http://dbf-software.com/download.html
Possibility to select deleted records in a batch mode will be added in the next version.
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 116
Joined: Wed Apr 21, 2010 7:27 pm

Re: Is it possible to SELECT deleted records?

Postby mkadmin » Thu Dec 01, 2016 2:08 am

Thanks a lot. Looking forward to the command line addition.

Mike Kokolakis
mkadmin
 
Posts: 5
Joined: Thu Mar 12, 2015 5:29 pm

Re: Is it possible to SELECT deleted records?

Postby somethingsimil » Fri Apr 28, 2017 6:20 pm

Has it been added to the command line? I do not see it in the docs...
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm

Re: Is it possible to SELECT deleted records?

Postby Admin » Mon May 01, 2017 7:45 pm

You can use EXECSCRIPT command for this purpose: http://dbf-software.com/execscript.html
Execute it as a regular SQL query:
Code: Select all
dbfcommander -q "EXECSCRIPT([SET DELETED OFF] + CHR(13) + [SELECT * FROM 'd:\sum_orders.dbf' WHERE DELETED() INTO TABLE 'd:\QueryDeleted.dbf'])"
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 116
Joined: Wed Apr 21, 2010 7:27 pm


Return to DBF Commander Professional

Who is online

Users browsing this forum: No registered users and 1 guest

cron