Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a SHOWSTOPPER bug or what?????
Message
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:
01482747
Vues:
115
>I disagree completely. Did you run the same code in SQL Server? It works as expected there. I trust SQL Server for correct parsing way more than FoxPro.

No one has yet to comment on the FACT that the results are different and as expected when executed against SQL Server 2000.

I do most of my work against SQL Server and I wrote that UPDATE statement as I would normally write in SQL Server (T-SQL). Fortunately, for me I double checked the results in FoxPro and noticed the HUGE undeniable difference. Again, I ask which do you trust more - SQL Server or FoxPro? I say SQL Server is the better benchmark and gold standard.

However, looking at the fine print in FoxPro help I see that it is BY DESIGN where Help says the following under the UPDATE - SQL section:

****************
Local_Alias specifies a temporary name for the table specified in Table. If you specify a local alias, you must use the local alias instead of the table name in the UPDATE statement. The alias can represent a table or a cursor.
****************

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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform