home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9356 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.3 KB  |  31 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!gatech!rpi!uwm.edu!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!rpeterse
  3. From: rpeterse@watserv1.uwaterloo.ca (Raymond Petersen)
  4. Subject: Re: Help with SQL statement
  5. Message-ID: <C1BqK7.FnH@watserv1.uwaterloo.ca>
  6. Organization: University of Waterloo
  7. References: <1993Jan22.211051.4867@vpnet.chi.il.us>
  8. Distribution: na
  9. Date: Sat, 23 Jan 1993 20:36:05 GMT
  10. Lines: 19
  11.  
  12. In article <1993Jan22.211051.4867@vpnet.chi.il.us> mike@vpnet.chi.il.us writes:
  13. >I have 2 tables lets say I have a Customer table and an order table.
  14. >I want to query the database for all customers and show their orders
  15. >for the past month.  I may have more than 1 order for a customer.
  16.  
  17. >The problem is that if I don't have an order for a customer, the join will
  18. >not find a match and that customer will be left out of the report.
  19.  
  20. >I still want to show the customer even if no orders are present.
  21.  
  22. >Is this possible with SQL ??  was my explanation clear enough ??
  23. Yes it was quite clear.  What you want is something called "outer joins".
  24. It is a feature that not every SQL RDBMS supports.
  25. I mostly use WATCOM SQL and they just put in support for this in version 3.1
  26. (just released in December)
  27.  
  28. Raymond Petersen
  29. MicroComputer Centre
  30. The Mutual Group   (Standard employer/employee warnings apply)
  31.