Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get no records when trying to exclude deleted records
Message
 
À
10/04/2001 16:49:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00494168
Message ID:
00494182
Vues:
23
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform