Volker,
That explains quite a bit. I've done extensive programming and scripting, but this is my first foray into SQL queries. The logic and construct is different from what I know, and unfortunately I need a working module as soon as possible. I'll ask Professor Google and see if I can figure out how to work NULLIF into my query. Thanks for your reply.