Hello Experts -
Very simple question. I want to delete records from my Subtask table, but only records from a certain product line, which is recorded in a related Incident table. A record from the Incident table may or may not have an associated record from the Subtask table, and it could have several. The tables are linked by common ID, as noted in the query below.
Here is my select statement:
SELECT *
FROM Subtasks
Join Incident on Subtasks.StandardLongInteger001=Incident.IncidentID
And Incident.StandardText002 not in ('Product1', 'Product2', 'Product3')
Will the following delete statement work?
DELETE Subtasks
WHERE Exists
(
FROM Subtasks
Join Incident on Subtasks.StandardLongInteger001=Incident.IncidentID
And Incident.StandardText002 not in ('Product1', 'Product2', 'Product3')
)
If this is not correct, please point me in the right direction? Thank you!
- Mark
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
This award recognizes an author who contributes the highest volume of original works or content. Recipients of this award produce extremely valuable content that prioritizes accuracy, relevancy, and professionalism.