hi everyone, I have the following query that is excluding any items in the HeatPumps, Cylinders & SolarThermal from my PriceList Table where a ModelNumber exists in the PriceList table. Now I need to reverse the below query and find any model numbers that exist in HeatPumps, Cylinders & SolarThermal tables but that are NOT in the PriceList table. Can someone show me how to do this please?
SELECT [PriceID]
,[DRModelNumber]
FROM [DR_HeatPumpCalc].[dbo].[tbl_lkupPriceList]
LEFT OUTER JOIN [DR_HeatPumpCalc].[dbo].[tbl_lkupHeatPumps] ON [dbo].[tbl_lkupPriceList].[DRModelNumber] = [dbo].[tbl_lkupHeatPumps].[ModelNumber]
LEFT OUTER JOIN [DR_HeatPumpCalc].[dbo].[tbl_lkupCylinders] ON [dbo].[tbl_lkupPriceList].[DRModelNumber] = [dbo].[tbl_lkupCylinders].[ModelNumber]
LEFT OUTER JOIN [DR_HeatPumpCalc].[dbo].[tbl_lkupSolarThermal] ON [dbo].[tbl_lkupPriceList].[DRModelNumber] = [dbo].[tbl_lkupSolarThermal].[ModelNumber]
WHERE [tbl_lkupHeatPumps].[ModelNumber] IS NULL
AND [tbl_lkupCylinders].[ModelNumber] IS NULL
AND [tbl_lkupSolarThermal].[ModelNumber] IS NULL
AND [tbl_lkupSolarThermal].[HydraulicPack] IS NULL
ORDER BY [DRModelNumber]