On Tue, 18 Feb 2003 13:24:22 -0600, Fogelson, Steve wrote: >I guess I was wondering how the "Incl. Empty" option in the "criteria" of a >"search" action could be related to a DBMS. I understand this option (if set >to false) to not include a criteria if null.
No, those settings deal with data that comes back after a query against the database. In your unusual case, you need to know ahead of time if you even want to join a particular table or not, based on a null in a linking column. In usual database schemas, the columns used for linking are not columns that would sometimes contain nulls. I think your situation is complicated enough that you ought to do what I suggested earlier, build your final query a little bit at a time, as you figure out what tables you need, and what columns you will select from each of those, and what links you will need for each of those. There are also multiple ways to do the database trick called an "outer join," which builds null-filled rows in the result set based on non- matches in the query. (rather than excluding rows from both contributing tables if they don't match anything, which is the normal result, also called an "inner join" or a "natural join"). I think you use R:Base, do you not? If so, there is an outer join syntax to SELECT, and you can also build your own logical equilvalent of the outer join by stringing parallel SELECT statements together with the UNION ALL syntax in between them. With three or more contributing tables, though, outer joins can get very hairy. Bill ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body