thedeal56
asked on
MySQL Correlated Subquery Best Practices
I've been getting around this type of issue with script instead of handling it with the initial query, and I was wondering how best to approach it from a SQL perspective.
Using this table as an example,
How would I design a query to select any ticket names that are like ('Replace PCs%' and IS_PARENT='1') as well as any ticket that has the PARENT_ID of the previously selected tickets? So, basically, how do I return an array containing both parent and children tickets related to a specific ticket name pattern? I would need the array to hold all fields related to the selected records. Thanks for reading.
Using this table as an example,
How would I design a query to select any ticket names that are like ('Replace PCs%' and IS_PARENT='1') as well as any ticket that has the PARENT_ID of the previously selected tickets? So, basically, how do I return an array containing both parent and children tickets related to a specific ticket name pattern? I would need the array to hold all fields related to the selected records. Thanks for reading.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
no problem, it wasn't too much typing, keep it in mind next time
(using an embedded image is better than an attached image as we don't have to flip between pages)
thanks.
(using an embedded image is better than an attached image as we don't have to flip between pages)
thanks.
ASKER