Query 2 tables

  • Thread starter Thread starter RuudM
  • Start date Start date
R

RuudM

Hi,

Hope someone can help me with the folowing problem:

I have 2 tables, members and tickets, related to eachother with the
unique field "id". Now I would like to extract all the members without a
ticketorder into a query.

translated (used to be in Dutch ;-):

SELECT DISTINCTROW members.Id, tickets.orderDate
FROM members INNER JOIN tickets ON members.Id = tickets.id
WHERE (tickets.orderdate) Is Null));

This results in no row at all.

The tickets table is only filled with orders from certain members, so
that is why I tried it with orderdate Is Null (or Nz or "", but that
didn't work also).
Somehow I got the feeling that I am searching in a totally wrong
direction......

Thx for any suggestions,

Ruud Mastbergen
Netherlands
 
Roxie, a powerfull answer which worked. And learned about the difference
between INNER and LEFT.

Thanks!

R.\\
 
Back
Top