Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting SELECT to maintain deleted record tag
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Getting SELECT to maintain deleted record tag
Miscellaneous
Thread ID:
00396814
Message ID:
00396814
Views:
25
I'm trying to do a SELECT from a table where some of the records are deleted. I need to include the deleted records in the result set. I've done a SET DELETED OFF and my SELECT. If I don't filter the list, eg SELECT * FROM myTable INTO CURSOR zzz it maintains the deleted tag. As soon as I try filtering the table the deleted tag disappears:
SELECT iid, ;
       fk_product, ;
       avail_day, ;
       editdatetime ;
  FROM specials ;
  WHERE editdatetime > THIS.dLastUpdate ;
  INTO CURSOR v_specials
This includes the deleted records but seems to clear the deleted flag. Is there some keyword I'm missing? Is this even possible?
I can work around this by doing:
SELECT iid, ;
       fk_product, ;
       avail_day, ;
       editdatetime, ;
       DELETED() AS IsDeleted ;
  FROM specials ;
  WHERE editdatetime > THIS.dLastUpdate ;
  INTO CURSOR v_specials
But for my own curiosity I'm still wondering if I can do it more directly.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform