R
rocco
Hello,
can someone make cleare in which order the subqueries in a SQL statement are
executed?
It seems this statment
SELECT CONTACT1.ID, CONTACT1.VISIT
FROM (SELECT ID, VISIT FROM CONTACT WHERE VISIT NOT LIKE 'c*') AS CONTACT1
WHERE CINT(CONTACT1.VISIT)>12
can't work because the WHERE clause of the main query is executed BEFORE the
WHERE clause in the subquery. This sounds odd to me because if the subquery
wont run first, there shouldn't be any table, and so any row, to evaluate by
the WHERE clause of the main query.
So, just to have things more clear in my mind, can you please give a short
hint on the order in which subqueries are executed?
Thank you all very very much,
Rocco
can someone make cleare in which order the subqueries in a SQL statement are
executed?
It seems this statment
SELECT CONTACT1.ID, CONTACT1.VISIT
FROM (SELECT ID, VISIT FROM CONTACT WHERE VISIT NOT LIKE 'c*') AS CONTACT1
WHERE CINT(CONTACT1.VISIT)>12
can't work because the WHERE clause of the main query is executed BEFORE the
WHERE clause in the subquery. This sounds odd to me because if the subquery
wont run first, there shouldn't be any table, and so any row, to evaluate by
the WHERE clause of the main query.
So, just to have things more clear in my mind, can you please give a short
hint on the order in which subqueries are executed?
Thank you all very very much,
Rocco