Category Archives: SQL Server

Using Not Exists in SQL

Suppose I have a query where I want everything in table A that is not in table B. For example, I want all the customers in table A who have not placed an order in table B. There are a surprising number of ways to build a select statement that returns the correct answer. Some of those queries may also give you an incorrect answer if one of the target fields has nullable data.

Aaron Bertrand’s article will walk you through each of the examples to show you why Not Exists is the best option for this type of query.

Fix for SSIS Error 0xC0209303

When using BIDS to create an SSIS package in a 64-bit environment it was easy to create the connection to a 32-bit Access Database. You can view and select columns from the database, modify them in the data flow, then map them to the destination table.

But when you execute the package you get an error 0xC0209303 which says the Access DB couldn’t be opened.

The quick fix: Under the Project menu pick the project Properties (bottom choice), pick Debugging under Configuration Properties, and set the Run64BitRuntime property to false.