Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUGG: Correlated UPDATE and DELETE - SQL Commands
Message
 
À
23/02/2005 19:22:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00989905
Message ID:
00989917
Vues:
15
Fabio,

VFP will not complain at compile time as long as command's syntax is correct. You know, all the required clauses, commas, etc. It doesn't think what the command is supposed to do.
So in the two cases where you expected a compile time error, you would at most get a run time one. But then again, VFP's SQL has survived several generations starting with the one that didn't even have JOIN clause. And VFP is backwards compatible as you know... (Some say it is good). So what you normally put as a JOIN condition can also exist as part of WHERE, and VFP will figure out, at runtime, what you meant actually.

And your ambiguous example also doesn't apply becasue VFP will open 2 tables (even if they are the same one) with different aliases and then will do all the joining and filtering, etc, as if they indeed were different

The one with DELETE Table1 FROM Table1 T JOIN JoinData...
is also correct because as I explained above Table1 is opened as alias T and therefore you are not really limiting the DELETE target, which is alias Table1, because there is nothing in the FROM clause talking about Table1 *alias*

--Andrew
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform