Apologies for the elusive subject title. I'm trying to filter only rows on one field only when another field has a certain value.
I have a query with several columns. One column (called NAME) has only two values so to keep this simple for the question the values are
This column will only ever have these two values for all the rows.
I have another column (called POSITION) that only ever has three values
I want to filter rows on another column that only applies to Paul.
Where NAME is = to PAUL only include rows from POSITION where they are MANAGER.
If the NAME is Jim, the filter will not apply to POSITION.
I'm unsure how to achieve this filter without affecting rows where the NAME is Jim.
I hope this makes sense.
What would be the easiest way to do this on the WHERE clause?
WHERE (NAME = 'Paul' and POSITION = 'MANAGER') or NAME = 'Jim'
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.