Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a SHOWSTOPPER bug or what?????
Message
De
26/09/2010 05:00:01
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01482687
Message ID:
01482759
Vues:
100
>Thus, this is why the correct syntax when using a "local alias" is as follows:
>
>update y set y.d1 = x.d2 from junk as y inner join junk2 as x on y.id = x.id &&works correctly
>
>Nevertheless, I find it disconcerting that FoxPro will execute and return incorrect results using the following that is syntactically incorrect according to FoxPro help via the following:
>
>update junk set d1 = x.d2 from junk as y inner join junk2 as x on y.id = x.id &&WRONG results.
>
>In my opinion the above should result in a syntax error.
Nope. Consider:
		USE (DBF("junk")) IN 0 ALIAS T_Tmp AGAIN
		USE IN junk  && Now it creates the error, as junk is eliminated from the variable name tables
		update junk set d1 = d2 from T_TMP inner join junk2 on t_tmp.id = junk2.id
		select * from t_Tmp

vs.
		USE (DBF("junk")) IN 0 ALIAS T_Tmp AGAIN
		* USE IN junk
		update junk set d1 = d2 from T_TMP inner join junk2 on t_tmp.id = junk2.id
		select * from t_Tmp
re-read my earlier post...

HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform