Gonzo,

Sounds like you might need something like this:

SELECT op_id, released
FROM op
WHERE op_id IN
    (SELECT op_id
     FROM travd
     WHERE travh_id = 1)

Dina
  ----- Original Message ----- 
  From: Gonzo Rock 
  To: CF-Talk 
  Sent: Saturday, December 22, 2001 3:04 PM
  Subject: Re: SQL Question


  You are SOOO Right... It did NOT put it in my example... BUT... It is 
in my table design. (I hate when I screw up in email like that!  It 
really complicates this process.)

  My delima is given a TravH_ID, create a list of all the OP Records 
related to the related set of TravD records via the travd.op_id field

  I have created something like this but it is returning an Op.OP_ID for 
ALL records in the traveled file... (it's not respecting the 
travd.travh_id = 1 restriction)

  SELECT op.op_id, op.released 
  FROM op, travD, travH
  WHERE  travD.travH_id = 1 AND op.op_id = travD.op_id

  ------- the original question, corrected <sheepish-grin> ----

  Given 3 tables:

  Table Operations(Op) 
  Op_ID, Op_Name,...

  and

  Table TravelerHEADER(TravH) 
  TravH_ID, TravName, Part_ID,...

  and

  Table TravelerDetail(TravD) 
  TravD_ID, TravH_ID, Op_ID, TravOrder,...

  How can I retrieve the OP RecordSet 
  associated with the subset of TravD records 
  given a single TravH_ID
  
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to