On Tue, Feb 16, 2010 at 03:33:23PM +0000, Oliveiros wrote: > Louis-David, > > Please advice me,
Hi Oliveiros, > if some cabin doesn't have a price i.e. it is not available, is there some > way to tell > which cruise it belongs to? In fact a cabin belongs to a ship and CAN be associated to a 'cruise' event with a price(id_cruise,id_cabin) object. > You have PRICE table which seems to me to be an associative table between > cruise and cabin, is this correct? Yes, > But, if the price doesn't have a register for that pair > (îd_cabin,id_cruise), how do you know that cabin belongs to that cruise, in > this case, cruise nº 1? I am trying to display a list of all cabins of a ship for a certain cruise even if some prices are missing, so the user sees what cabins are not available. After much trial and error I was finally able to build a left join query that works. Thanks a lot for offering your help! -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql