Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a SHOWSTOPPER bug or what?????
Message
From
26/09/2010 05:00:01
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01482687
Message ID:
01482759
Views:
101
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform