Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get no records when trying to exclude deleted records
Message
 
To
10/04/2001 16:49:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00494168
Message ID:
00494182
Views:
22
As Rip already mentioned, just do a SET DELETED ON and it'll work.

The reason it doesn't work as you posted it is because SQL doesn't work when referencing aliases in functions like DELETED("alias") or RECNO("alias") when SELECTing from more than one table.

This is because SELECT actually re-opens the tables AGAIN in a different work area and works on *those*. So when you're referencing DELETED("vitems"), VFP is doing exactly what you're saying and is looking at the current record in VITEMS and not at the record of the opened-again VITEMS being used in the query... and it will be looking at that *one* record throughout the whole query. So if the current record of VITEMS happens to be marked as deleted and you run your query, you'll get nothing.

Hope this helps.

--Brad
Previous
Reply
Map
View

Click here to load this message in the networking platform