Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUGG: Correlated UPDATE and DELETE - SQL Commands
Message
De
24/02/2005 03:53:08
 
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:
00989992
Vues:
13
>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.

I know what ago VFP, what I say is that the choice of the VFPT is mistaken.

Here backward compatibility issue don't existe.
The problem is what do VFP when found a :
DELETE Target FROM Target [AS Alias] ...
If [AS Alias] is omitted, VFP match Target names,
otherwise the FROM clasue is a tables product

Result, if you write the command without [AS Alias],
and if after add [AS Alias] you have to change the command logic.

This is a very bad choice.
However, by now not there is more remedy.

Fabio

>
>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
Répondre
Fil
Voir

Click here to load this message in the networking platform