>I want to compose a query that will pull out each
>distinct instance of a form (in other words, no
>duplicates) and then list which procedures use that
>form

Something like...

SELECT DISTINCT formName
FROM forms INNER JOIN procedures USING (formName)

PB
  ----- Original Message -----
  From: Robert Reed
  To: [EMAIL PROTECTED]
  Sent: Wednesday, May 19, 2004 11:12 PM
  Subject: Help with Joins


  Greetings.

  I have a table that contains procedures and a table
  that contains forms.  Each procedure may have 1 or
  more forms or it may have no associated forms.  Each
  form may be relevant to more than 1 procedure.  The
  procedure table has 1 entry per procedure.  The forms
  table may have more than 1 entry per form depending on
  how many procedures use that form.  Each form entry
  has a foriegn key tying it to the record number of the
  procedure.

  I want to compose a query that will pull out each
  distinct instance of a form (in other words, no
  duplicates) and then list which procedures use that
  form

  So:  Form Name   Procedure(s) Name

  Is this a clear enough explanation for folks?  I'm
  willing to RTFM if somebody will point me to the
  chapter(s) that discuss different join syntax and how
  it's used in MySQL.  I'm using 3.23.54 in my
  production environment at the moment and my tables are
  MyISAM.

  Thanks in Advance

  =====
  Robert Reed
  512-869-0063 home
  512-818-2460 cell




  __________________________________
  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year
  http://smallbusiness.promotions.yahoo.com/offer

  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


Reply via email to