I need help with a query here

ladivapr

Registered User.
Local time
Today, 19:22
Joined
Jul 15, 2003
Messages
28
Okay guys help me out this is very important to me



I got this table "Ingredients" then I got this other tables "Clinical Studies" "Formulations". An ingredient can be in many formulations and formulations appear in many clinical studies.

The query calls for the Ingredients and the studies with their respective dates. I want that the query to show all ingredients even if they dont have studies attached to it. It only shows the ones that have studies attached. Is there a criteria I have to set or something ? There is gotta be something I can do :)

Thanks ahead guys!

ladiva
 
Pat (Sorry to butt in ladivapr), can you recommend any good links on the definition of Join Types in tables and queries. I still do not fully understand the meaning of each join in enough depth to program SQL effectively.

Thanks
 
re

I see what it does but this aint easy. Cause I want to enforce the outer join force first and then it says if I want that I need to do a separate query for it and the unite it in another SQL statement I figure in a new query. Doing this SQL statement is what I dont know how to do it. :confused:
 
First, write a query which Outer Joins Ingredients to Clinical Studies. This will give you a result set of all ingredients whether or not they have studies "attached". I'm not sure how your formulations table factors in, but you'll probably need to write another query based off of a join between the first query and the formulations table. See how close you get to what you need and then post back.
 
re

Oh thank guys I got it. Oh this board is awesome!!!

I did a query with the inner joins and then a new query adding the ingredient table with left join with the query table with the inner joins. Worked perfectly :D

Thankssssssssssssssss!!!

ladiva :)
 

Users who are viewing this thread

Back
Top Bottom