General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Multiple JOINS Permitted using SQL DELETE?
VFP 9 allowed the use of JOIN Syntax in SQL Deletes. Is there a limit to 1 JOIN?
When I created a DELETE SQL Command with multiple JOINS:
DELETE tskdocs ;
FROM tskdocs ;
JOIN tasks ;
ON Tskdocs.kd_t_id = Tasks.t_id ;
JOIN taskdel ;
ON Tasks.t_assgn_to = Taskdel.emp_no ;
WHERE Taskdel.process AND Tasks.t_status = "I"
The result was equivalent to:
DELETE tskdocs ;
FROM tskdocs ;
JOIN tasks ;
ON Tskdocs.kd_t_id = Tasks.t_id
Even though the SQL Command:
SELECT tskdocs.* ;
FROM tskdocs ;
JOIN tasks ;
ON Tskdocs.kd_t_id = Tasks.t_id ;
JOIN taskdel ;
ON Tasks.t_assgn_to = Taskdel.emp_no ;
WHERE Taskdel.process AND Tasks.t_status = "I"
yields the correct result.
Appears that only 1 JOIN is permitted in an SQL DELETE Command. Is this the case?
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