D J Horton Consulting Ltd

Personal reference to useful tips and tricks for SQL Server, SQL Server Reporting Services and Crystal Reports.



My alternative to scraps of paper lying about.



Others may find bits of it useful!








Tuesday, 4 January 2011

Using the EXCEPT clause - SQL

--
--example EXCEPT clause....lists EstablishmentID without corresponding Jobs
--
SELECT EstablishmentID FROM Establishment
EXCEPT
SELECT JobLog_EstablishmentID FROM JobLog
ORDER BY EstablishmentID

No comments: