General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only