Select records no in subquery, return nothing
I have a table with customers and another with documents, I want to get all customers that don’t are in the subquery having document type 2
Filter rows in sql query when a subquery returns null
I have a problem with subqueries. I’d like to select rows which contain a sum from a different table – so far no problem. However I’d like to filter for rows that don’t have sum.
How do I get results from one query to influence the second query results
Currently, I have two queries and I would like to condense into one with two SELECT statements. I am using MS Access SQL so that I can create a form later to allow user to add data to search for their criteria using: pathid, ctcode, or casetype. It tells me that I cannot use GROUP_CONCAT() to get achieve a 1 to many result as displayed in my Inner Query picture below (there is only one pathid to one casenumber but many ctcodes for that 1 casenumber). I have 5 tables patcase, billingcode, internalbillingcode, consultinformation, and specimen. I believe I need to run two queries to get the information needed. Any Ideas on how to achieve. My inner query is as follows: