Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views will not show deleted records
Message
From
15/07/2004 16:16:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00924761
Message ID:
00924899
Views:
13
>I'm not sure if it'll work, but you could try adding DELETED([alias]) as part of the JOIN condition (make sure you specify the alias). Another option might be to try a HAVING clause checking a field "DELETED([alias]) as lDeleted" or -- if this is a one-to-many join-- "sum(iif(DELETED([alias]),1,0)) as nDeleted"

I am quite certain that this will NOT work, because the query engine will do the equivalent of USE (TABLE) AGAIN.

Selecting from a single table might work correctly for deleted records. This can then be combined with other tables. However, I would also consider a solution as the one you outine in the next paragraph, preferable.

>If deleted needs to mean something more than "I don't ever want to know about this record again" than I would suggest adding a tDeleted T field and use that to indicate "Deleted" Easier if you plan that upfront, so you can include that in all of your view's WHERE, but it offers a lot more flexibility than the delete mark.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform