Click here to Skip to main content
15,846,091 members

Comments by jurhas (Top 2 by date)

jurhas 2-Sep-16 5:10am View    
I did not understand a single row of your query. This is the reason because I did not help you. But taking the title for meaningfull, if you have two queries and you want find the rows that are in the first table and not in the second one, there is available the EXCEPT instruction such:
USE AdventureWorks2012;
GO
SELECT ProductID
FROM Production.Product
EXCEPT
SELECT ProductID
FROM Production.WorkOrder ;
--Result: 266 Rows (products without work orders)
refer to the SQLSERVER documentation
jurhas 1-Sep-16 4:25am View    
Did you tried EXCEPT and INTERCEPT ? They are supported from mostly high level databases