List:General Discussion« Previous MessageNext Message »
From:Jochen Haeberle Date:June 5 1999 8:11am
Subject:[SQL] 2 answers to a question
View as plain text  
Hi,

I am rather new to SQL and am stumbling from time to time. I did 
consult the manual on this but could not find a clue (unfortunately I 
tend to look in wrong chapters...)

Here's my problem:

I would like to select the rows that either contain the value from a 
row in another table or are empty.

this means I would like to extend the following:

Select ... from a,b,c
   where a.Seller_ID = 123
   AND b.ID = a.Rubrik_ID
   AND c.ID = a.Buyer_ID
   AND a.Finished = 0

This assumes (in line 4, AND c.ID = a.Buyer_ID), that there is a 
buyer. How could I extend this to give me a list of products that are 
sold and those that are not?
I tried   AND (c.ID = a.Buyer_ID or a.Buyer = 0) but this did not 
help. It produced a "table is full" message :-(

Jochen
Thread
[SQL] 2 answers to a questionJochen Haeberle5 Jun
  • Re: [SQL] 2 answers to a questionBenjamin Pflugmann5 Jun