Thursday, March 03, 2005

SQL woes

The reports were all fine and dandy, and everything seemed to going swimmingly when I got an email from the director wondering why some of the transactions appeared to be missing. I went back to the database, and everything looked fine. I checked the view that I was using to see that all the joins were set up correctly. I extracted all the transactions and the ones I wanted were there, but they weren't showing up in the extract using MS Query. I started taking away the selection criteria, until I realized that using a LIKE operator in the WHERE clause wasn't pulling back records where there was a null in a particular field, even when you set the wildcard to select everything. It's a non-validated field as well, so I've got to pull back all the data and then start filtering it with pivot tables in Excel to get the report I need.

Oh Joy.

No comments: