I need some help in writing a query; I have three tables for example, 1 Parent table, 1 child table, and 1 rules table. The rules apply to all the Childs of the parent. So for example:
PARENT_TABLE
---------------
PARENT_ID
PARENT_NAME
CHILD_TABLE
-------------
CHILD_ID
CHILD_PARENT_ID
CHILD_NAME
RULES
--------------
RULE_ID
RULE_PARENT_ID
RULE_PARENT_CODE_INDR
RULE_PARENT_ZONE_INDR
What I would like my result to like is:
CHILD_ID
RULE_PARENT_CODE_INDR
RULE_PARENT_ZONE_INDR
So basically I want to select all the Childs owned by the parent and the other fields in the rules table. For the life of me I can not get the right results... any ideas. ?
Thanks
PARENT_TABLE
---------------
PARENT_ID
PARENT_NAME
CHILD_TABLE
-------------
CHILD_ID
CHILD_PARENT_ID
CHILD_NAME
RULES
--------------
RULE_ID
RULE_PARENT_ID
RULE_PARENT_CODE_INDR
RULE_PARENT_ZONE_INDR
What I would like my result to like is:
CHILD_ID
RULE_PARENT_CODE_INDR
RULE_PARENT_ZONE_INDR
So basically I want to select all the Childs owned by the parent and the other fields in the rules table. For the life of me I can not get the right results... any ideas. ?
Thanks