Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: basic sql question


Message #1 by "Aaron Wilt" <aaronwilt@h...> on Thu, 24 Oct 2002 17:38:29
Hello all-

I'm pretty new to databases and sql, so if someone could help me out with 
this, it'd be great!

I'm not sure how to approach this problem..

I have two tables, tblReport and tblUser
both tables have a corresponding rpt_id
tblReport has a create_id and tblUser has a user_id

I would like to grab all rows out of tblReport where create_id = "Me" and 
also grab all rows out of tblUser where user_id = "Me" but only if the 
rpt_id (in tbluser) does not already appear in the rows I have grabbed.  
So basically i want all of the specific create_id's and add to them all 
the user_id's as long as the rpt_id that the user_id refers to has not 
already been grabbed.

hopefully that makes sense... hehe

Thanks for the help!

Aaron.

  Return to Index