SQL Select with blank linked tables

Ian Devaney idevaney at mac.com
Sun Nov 2 22:33:17 CST 2003


I have several tables linked by objectPointers and am trying to create 
a standard SQL search query.

   s = "SELECT "
   s = s + "people.*, "
   s = s + "gifts.*, "
   s = s + "stores.*, "
   s = s + "events.*, "
   s = s + "links.*, "
   s = s + "FROM people, gifts, stores, events, links"

When there ARE entries in the gifts table - for example - which are 
linked to a person in the people table then this works fine.

What is the correct syntax to still find the "people" records if they 
don't have any "gifts" or if the "gifts" don't have any "stores" etc. 
etc. ?

I presume I should be able to do this with some kind of join but can't 
seem to get anything to work.

Cheers,

Ian



More information about the Valentina mailing list