Hi,
I need to some help figuring out a select statement, let me explain... This is a parent/child setup each having a field named KEY that will relate them.
One(parent) to Many(child) - and assuming that each child only has 1 parent... used only as an analogy, (the parent/child references)
Table #1 - Table name: PARENT
Fields: key, name
Parents Sample Data:
111, John
222, Mary
333, Jane
Table #2 - Table name: Child
Fields: key, name
Child Sample Data:
222, Jill - Mary's child
222, Steve - Mary's child
111, Bob - John's child
333, Robert - Jane's child
111, Kay - John's child
111, Lyn - John's child
333, Crystal - Jane's child
Objective is to find and list all the children that belongs to the parent when only a child's name is known.
In this case we want to find out who LYN's parent and siblings are, so we
1. Search the child's table on name for "LYN" and get the key,
2. use that key and do a lookup also to the same/child table to get a list of all the siblings/children that has the same key,
3. then do a lookup using the same key to the parents table to get the parents data,
The result set will contain the parent data of "John" and siblings Bob, Kay, and Lyn...
Thanks, Stanley
I need to some help figuring out a select statement, let me explain... This is a parent/child setup each having a field named KEY that will relate them.
One(parent) to Many(child) - and assuming that each child only has 1 parent... used only as an analogy, (the parent/child references)
Table #1 - Table name: PARENT
Fields: key, name
Parents Sample Data:
111, John
222, Mary
333, Jane
Table #2 - Table name: Child
Fields: key, name
Child Sample Data:
222, Jill - Mary's child
222, Steve - Mary's child
111, Bob - John's child
333, Robert - Jane's child
111, Kay - John's child
111, Lyn - John's child
333, Crystal - Jane's child
Objective is to find and list all the children that belongs to the parent when only a child's name is known.
In this case we want to find out who LYN's parent and siblings are, so we
1. Search the child's table on name for "LYN" and get the key,
2. use that key and do a lookup also to the same/child table to get a list of all the siblings/children that has the same key,
3. then do a lookup using the same key to the parents table to get the parents data,
The result set will contain the parent data of "John" and siblings Bob, Kay, and Lyn...
Thanks, Stanley