I hope I can explain my problem and not exclude anything in this message:
I have to retrieve records only if a person is in a certain area.
Table A
person_id
term
charge_descr
amount
Table B
person_id
term
class_number
area
What I have so far:
Select a.person_id, a.term, b.class_number, a.charge_descr, a.amount from
table a,
table b
where
a.person_id=b.person_id
and
a.term=b.term (used left outer joins)
and
a.term='F06'
Results so far:
person_id term class_number charge_descr amount
1 F06 6988 tuit 50
1 F06 fee 5
Problem:
There are different areas where a person can be charged so I only need to retrieve a person in a certain area and the area is in table b.
So only retrieve students in area Testing. I’ve tried just adding where area='Testing' but then of course, it doesn’t give me the fee data.
Thanks for the help.
I have to retrieve records only if a person is in a certain area.
Table A
person_id
term
charge_descr
amount
Table B
person_id
term
class_number
area
What I have so far:
Select a.person_id, a.term, b.class_number, a.charge_descr, a.amount from
table a,
table b
where
a.person_id=b.person_id
and
a.term=b.term (used left outer joins)
and
a.term='F06'
Results so far:
person_id term class_number charge_descr amount
1 F06 6988 tuit 50
1 F06 fee 5
Problem:
There are different areas where a person can be charged so I only need to retrieve a person in a certain area and the area is in table b.
So only retrieve students in area Testing. I’ve tried just adding where area='Testing' but then of course, it doesn’t give me the fee data.
Thanks for the help.