Your SELECT statement does not ask for product information. :) Add your final JOIN statement and something like this in the SELECT --- SELECT product.description, customer.firstname, customer.lastname, ordermaster.orderdate, orderdetail,qty --- and try again.

~Dina
  ----- Original Message -----
  From: Rodger
  To: SQL
  Sent: Saturday, December 27, 2003 8:27 AM
  Subject: Problem with JOINs

  I have four tables: customers, ordermaster, orderdetail, and products.
  I'm trying to get the details of a customer, their order, each item in the
  order and the details of each product in the order.
  customers, ordermaster, orderdetail are parent/child of each other, and
  products is the parent of orderdetail.
  This query runs fine:

  SELECT * FROM customer
  INNER JOIN ordermaster ON ( customer.custnum = ordermaster.custnum )
  INNER JOIN orderdetail ON ( ordermaster.ordnum = orderdetail.ordnum )

  but I how do I add the products to also get that information?
  If I add:

  INNER JOIN product ON ( orderdetail.prodnum = product.prodnum )

  to the end, it just excludes the orderdetails.

  Rodger Meier
  [EMAIL PROTECTED]
  503/409-9573
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to